forked from bofh/fetsite
error fixes
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,6 +5,7 @@
|
|||||||
/config/omniauth_secrets.yml
|
/config/omniauth_secrets.yml
|
||||||
/config/database.yml
|
/config/database.yml
|
||||||
/config/initializers/omniauth_secrets.rb
|
/config/initializers/omniauth_secrets.rb
|
||||||
|
/config/databas*
|
||||||
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
||||||
#
|
#
|
||||||
# If you find yourself ignoring temporary files generated by your text editor
|
# If you find yourself ignoring temporary files generated by your text editor
|
||||||
|
|||||||
1
Gemfile
1
Gemfile
@@ -60,6 +60,7 @@ gem "omniauth"
|
|||||||
gem "omniauth-facebook"
|
gem "omniauth-facebook"
|
||||||
gem "omniauth-ldap"
|
gem "omniauth-ldap"
|
||||||
|
|
||||||
|
gem "fb_graph"
|
||||||
# Roles for users
|
# Roles for users
|
||||||
gem "rolify"
|
gem "rolify"
|
||||||
|
|
||||||
|
|||||||
16
Gemfile.lock
16
Gemfile.lock
@@ -41,6 +41,7 @@ GEM
|
|||||||
activerecord (>= 2.3.0)
|
activerecord (>= 2.3.0)
|
||||||
rake (>= 0.8.7)
|
rake (>= 0.8.7)
|
||||||
arel (3.0.3)
|
arel (3.0.3)
|
||||||
|
attr_required (1.0.0)
|
||||||
awesome_nested_set (2.1.6)
|
awesome_nested_set (2.1.6)
|
||||||
activerecord (>= 3.0.0)
|
activerecord (>= 3.0.0)
|
||||||
bcrypt-ruby (3.1.2)
|
bcrypt-ruby (3.1.2)
|
||||||
@@ -83,6 +84,11 @@ GEM
|
|||||||
railties (>= 3.0.0)
|
railties (>= 3.0.0)
|
||||||
faraday (0.8.8)
|
faraday (0.8.8)
|
||||||
multipart-post (~> 1.2.0)
|
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)
|
font-awesome-rails (4.0.3.1)
|
||||||
railties (>= 3.2, < 5.0)
|
railties (>= 3.2, < 5.0)
|
||||||
formtastic (2.2.1)
|
formtastic (2.2.1)
|
||||||
@@ -114,6 +120,7 @@ GEM
|
|||||||
hashie (2.0.5)
|
hashie (2.0.5)
|
||||||
hike (1.2.3)
|
hike (1.2.3)
|
||||||
httpauth (0.2.0)
|
httpauth (0.2.0)
|
||||||
|
httpclient (2.4.0)
|
||||||
i18n (0.6.1)
|
i18n (0.6.1)
|
||||||
journey (1.0.4)
|
journey (1.0.4)
|
||||||
jquery-fileupload-rails (0.4.1)
|
jquery-fileupload-rails (0.4.1)
|
||||||
@@ -171,6 +178,12 @@ GEM
|
|||||||
rack (1.4.5)
|
rack (1.4.5)
|
||||||
rack-cache (1.2)
|
rack-cache (1.2)
|
||||||
rack (>= 0.4)
|
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-ssl (1.3.3)
|
||||||
rack
|
rack
|
||||||
rack-test (0.6.2)
|
rack-test (0.6.2)
|
||||||
@@ -247,11 +260,11 @@ GEM
|
|||||||
warden (1.2.3)
|
warden (1.2.3)
|
||||||
rack (>= 1.0)
|
rack (>= 1.0)
|
||||||
webrick (1.3.1)
|
webrick (1.3.1)
|
||||||
<<<<<<< Updated upstream
|
|
||||||
wikicloth (0.8.1)
|
wikicloth (0.8.1)
|
||||||
builder
|
builder
|
||||||
expression_parser
|
expression_parser
|
||||||
rinku
|
rinku
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
|
||||||
@@ -267,6 +280,7 @@ DEPENDENCIES
|
|||||||
devise (~> 2.2.3)
|
devise (~> 2.2.3)
|
||||||
execjs (~> 1.4.0)
|
execjs (~> 1.4.0)
|
||||||
factory_girl_rails
|
factory_girl_rails
|
||||||
|
fb_graph
|
||||||
font-awesome-rails
|
font-awesome-rails
|
||||||
formtastic (~> 2.2.1)
|
formtastic (~> 2.2.1)
|
||||||
formtastic-bootstrap (~> 2.1.3)
|
formtastic-bootstrap (~> 2.1.3)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ class ThemengruppenController < ApplicationController
|
|||||||
# GET /themengruppen.json
|
# GET /themengruppen.json
|
||||||
load_and_authorize_resource
|
load_and_authorize_resource
|
||||||
def index
|
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('themengruppe.new'), :path=>new_themengruppe_path()}]
|
||||||
@toolbar_elements = [{:icon=>:plus, :hicon=>'icon-plus-sign', :text=>I18n.t('common.verwalten'), :path=>verwalten_all_themengruppen_path()}]
|
@toolbar_elements = [{:icon=>:plus, :hicon=>'icon-plus-sign', :text=>I18n.t('common.verwalten'), :path=>verwalten_all_themengruppen_path()}]
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ class WikisController < ApplicationController
|
|||||||
def show
|
def show
|
||||||
@wiki = Wiki.find(params[:id])
|
@wiki = Wiki.find(params[:id])
|
||||||
@fragen = @wiki.fragen
|
@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
|
end
|
||||||
|
|
||||||
def wiki
|
def wiki
|
||||||
|
|||||||
@@ -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
|
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
|
has_many :nlinks, as: :link
|
||||||
def validate_birthday
|
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_month, "Invalides Datum")
|
||||||
errors.add(:birth_day, "Invalides Datum")
|
errors.add(:birth_day, "Invalides Datum")
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def title
|
def title
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ belongs_to :fetprofile
|
|||||||
def self.find_for_facebook_oauth(auth, signed_in_resource=nil)
|
def self.find_for_facebook_oauth(auth, signed_in_resource=nil)
|
||||||
logger.debug auth.to_s
|
logger.debug auth.to_s
|
||||||
logger.debug "DDD Username= #{auth.username}"
|
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
|
unless user
|
||||||
user = User.create(name:auth.uid,
|
user = User.create(name:auth.uid,
|
||||||
provider:auth.provider,
|
provider:auth.provider,
|
||||||
|
|||||||
@@ -8,9 +8,9 @@
|
|||||||
<%= interninfo.street %>
|
<%= interninfo.street %>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
<%= raw("<b>Telefon: </b>")+ interninfo.telnr + "<br>" unless interninfo.telnr.empty?%>
|
<%= raw("<b>Telefon: </b>")+ interninfo.telnr + "<br>" unless (interninfo.telnr.nil? || interninfo.telnr.empty?) %>
|
||||||
<%= raw("<b>Handy: </b>") +interninfo.hdynr unless interninfo.hdynr.empty? %><br>
|
<%= raw("<b>Handy: </b>") +interninfo.hdynr unless interninfo.hdynr.nil? || interninfo.hdynr.empty? %><br>
|
||||||
<%= raw("<b>Skype: </b>") +interninfo.skype unless interninfo.skype.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.empty? %><br>
|
<%= raw("<b>Instant Messaging: </b>") +interninfo.instant unless interninfo.instant.nil? || interninfo.instant.empty? %><br>
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
get "wiki/:name", action: :wiki, controller: :wikis
|
get "wiki/:name", action: :wiki, controller: :wikis
|
||||||
resources :wikis do
|
resources :wikis do
|
||||||
member do
|
member do
|
||||||
get :verwalten
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -2,6 +2,6 @@ class AddWikiToThema < ActiveRecord::Migration
|
|||||||
def change
|
def change
|
||||||
add_column :themen, :wikiname, :string
|
add_column :themen, :wikiname, :string
|
||||||
add_column :themen, :wikiformat, :integer
|
add_column :themen, :wikiformat, :integer
|
||||||
add_column :themen, :hidelink, :boolea
|
add_column :themen, :hidelink, :boolean
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user