Merge pull request #615 from hennevogel/master
Implements sign up during registration. Solves most of #215
This commit is contained in:
commit
defef46ae8
14 changed files with 113 additions and 117 deletions
|
|
@ -121,6 +121,10 @@ class Ability
|
|||
can :show, Commercial, commercialable_type: 'Event', commercialable_id: Event.where(state: 'confirmed').pluck(:id)
|
||||
# can view others
|
||||
can :show, User
|
||||
# can register
|
||||
can [:read, :create], Registration do |registration|
|
||||
registration.new_record?
|
||||
end
|
||||
end
|
||||
|
||||
def signed_in(user)
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
class Registration < ActiveRecord::Base
|
||||
belongs_to :user
|
||||
validates :user, presence: true
|
||||
accepts_nested_attributes_for :user
|
||||
belongs_to :conference
|
||||
belongs_to :dietary_choice
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue