error fixes

This commit is contained in:
2014-06-14 14:16:16 +02:00
parent 25743f8b9f
commit b1c46a3dc3
10 changed files with 29 additions and 11 deletions

1
.gitignore vendored
View File

@@ -5,6 +5,7 @@
/config/omniauth_secrets.yml
/config/database.yml
/config/initializers/omniauth_secrets.rb
/config/databas*
# See http://help.github.com/ignore-files/ for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor

View File

@@ -60,6 +60,7 @@ gem "omniauth"
gem "omniauth-facebook"
gem "omniauth-ldap"
gem "fb_graph"
# Roles for users
gem "rolify"

View File

@@ -41,6 +41,7 @@ GEM
activerecord (>= 2.3.0)
rake (>= 0.8.7)
arel (3.0.3)
attr_required (1.0.0)
awesome_nested_set (2.1.6)
activerecord (>= 3.0.0)
bcrypt-ruby (3.1.2)
@@ -83,6 +84,11 @@ GEM
railties (>= 3.0.0)
faraday (0.8.8)
multipart-post (~> 1.2.0)
fb_graph (2.7.15)
httpclient (>= 2.2.0.2)
multi_json (>= 1.3)
rack-oauth2 (>= 0.14.4)
tzinfo
font-awesome-rails (4.0.3.1)
railties (>= 3.2, < 5.0)
formtastic (2.2.1)
@@ -114,6 +120,7 @@ GEM
hashie (2.0.5)
hike (1.2.3)
httpauth (0.2.0)
httpclient (2.4.0)
i18n (0.6.1)
journey (1.0.4)
jquery-fileupload-rails (0.4.1)
@@ -171,6 +178,12 @@ GEM
rack (1.4.5)
rack-cache (1.2)
rack (>= 0.4)
rack-oauth2 (1.0.8)
activesupport (>= 2.3)
attr_required (>= 0.0.5)
httpclient (>= 2.2.0.2)
multi_json (>= 1.3.6)
rack (>= 1.1)
rack-ssl (1.3.3)
rack
rack-test (0.6.2)
@@ -247,11 +260,11 @@ GEM
warden (1.2.3)
rack (>= 1.0)
webrick (1.3.1)
<<<<<<< Updated upstream
wikicloth (0.8.1)
builder
expression_parser
rinku
PLATFORMS
ruby
@@ -267,6 +280,7 @@ DEPENDENCIES
devise (~> 2.2.3)
execjs (~> 1.4.0)
factory_girl_rails
fb_graph
font-awesome-rails
formtastic (~> 2.2.1)
formtastic-bootstrap (~> 2.1.3)

View File

@@ -3,7 +3,7 @@ class ThemengruppenController < ApplicationController
# GET /themengruppen.json
load_and_authorize_resource
def index
@themengruppen = Themengruppe.public.order(:priority).reverse
@themengruppen = Themengruppe.where(:public=>true).order(:priority).reverse
@toolbar_elements = [{:icon=>:plus, :hicon=>'icon-plus-sign', :text=>I18n.t('themengruppe.new'), :path=>new_themengruppe_path()}]
@toolbar_elements = [{:icon=>:plus, :hicon=>'icon-plus-sign', :text=>I18n.t('common.verwalten'), :path=>verwalten_all_themengruppen_path()}]

View File

@@ -4,7 +4,7 @@ class WikisController < ApplicationController
def show
@wiki = Wiki.find(params[:id])
@fragen = @wiki.fragen
@toolbar_elements = [{:icon=>:pencil, :hicon=>'icon-pencil', :text=>I18n.t('wiki.edit'), :path=>verwalten_wiki_path(@wiki)}]
@toolbar_elements = [{:icon=>:pencil, :hicon=>'icon-pencil', :text=>I18n.t('wiki.edit'), :path=>verwalten_thema_path(@wiki)}]
end
def wiki

View File

@@ -31,10 +31,12 @@ class Fetprofile < ActiveRecord::Base
accepts_nested_attributes_for :memberships, :reject_if=>lambda{|a| a[:typ].blank?|| a[:start].blank? ||a[:gremium_id].blank?}, :allow_destroy=>true
has_many :nlinks, as: :link
def validate_birthday
unless Date.valid_date?(birth_year, birth_month, birth_day)
unless birth_month.nil? || birth_day.nil?
unless Date.valid_date?((birth_year.nil?) ? Date.today.year : birth_year, birth_month, birth_day)
errors.add(:birth_month, "Invalides Datum")
errors.add(:birth_day, "Invalides Datum")
end
end
end
def title

View File

@@ -38,7 +38,7 @@ belongs_to :fetprofile
def self.find_for_facebook_oauth(auth, signed_in_resource=nil)
logger.debug auth.to_s
logger.debug "DDD Username= #{auth.username}"
# user = User.where(:provider => auth.provider, :uid => auth.uid).first
user = User.where(:provider => auth.provider, :uid => auth.extra.raw_info.uid).first
unless user
user = User.create(name:auth.uid,
provider:auth.provider,

View File

@@ -8,9 +8,9 @@
<%= interninfo.street %>
</p>
<p>
<%= raw("<b>Telefon: </b>")+ interninfo.telnr + "<br>" unless interninfo.telnr.empty?%>
<%= raw("<b>Handy: </b>") +interninfo.hdynr unless interninfo.hdynr.empty? %><br>
<%= raw("<b>Skype: </b>") +interninfo.skype unless interninfo.skype.empty? %><br>
<%= raw("<b>Instant Messaging: </b>") +interninfo.instant unless interninfo.instant.empty? %><br>
<%= raw("<b>Telefon: </b>")+ interninfo.telnr + "<br>" unless (interninfo.telnr.nil? || interninfo.telnr.empty?) %>
<%= raw("<b>Handy: </b>") +interninfo.hdynr unless interninfo.hdynr.nil? || interninfo.hdynr.empty? %><br>
<%= raw("<b>Skype: </b>") +interninfo.skype unless interninfo.skype.nil? || interninfo.skype.empty? %><br>
<%= raw("<b>Instant Messaging: </b>") +interninfo.instant unless interninfo.instant.nil? || interninfo.instant.empty? %><br>
</p>

View File

@@ -25,7 +25,7 @@
get "wiki/:name", action: :wiki, controller: :wikis
resources :wikis do
member do
get :verwalten
end
end
end

View File

@@ -2,6 +2,6 @@ class AddWikiToThema < ActiveRecord::Migration
def change
add_column :themen, :wikiname, :string
add_column :themen, :wikiformat, :integer
add_column :themen, :hidelink, :boolea
add_column :themen, :hidelink, :boolean
end
end