Editable registrations
This commit is contained in:
@@ -13,6 +13,10 @@ class ConferenceRegistration < ActiveRecord::Base
|
||||
[:none, :tent, :house]
|
||||
end
|
||||
|
||||
def self.all_spaces
|
||||
[:bed_space, :floor_space, :tent_space]
|
||||
end
|
||||
|
||||
def self.all_bike_options
|
||||
[:yes, :no]
|
||||
end
|
||||
@@ -20,4 +24,8 @@ class ConferenceRegistration < ActiveRecord::Base
|
||||
def self.all_food_options
|
||||
[:meat, :vegetarian, :vegan]
|
||||
end
|
||||
|
||||
def self.all_considerations
|
||||
[:vegan, :smoking, :pets, :quiet]
|
||||
end
|
||||
end
|
||||
|
||||
+1
-4
@@ -13,7 +13,7 @@ class User < ActiveRecord::Base
|
||||
accepts_nested_attributes_for :authentications
|
||||
|
||||
before_save do |user|
|
||||
user.locale = I18n.locale
|
||||
user.locale ||= I18n.locale
|
||||
end
|
||||
|
||||
def can_translate?(to_locale = nil, from_locale = nil)
|
||||
@@ -48,9 +48,6 @@ class User < ActiveRecord::Base
|
||||
user = where(email: email).first
|
||||
|
||||
unless user
|
||||
# not really a good UX so we should fix this later
|
||||
#do_404
|
||||
#return
|
||||
user = new(email: email)
|
||||
user.save!
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user