Subscription on Registration, Independent Subscription without registration

This commit is contained in:
Gopesh Tulsyan 2014-07-25 13:13:35 +05:30
parent 41fc21f7f4
commit a39f4cf0dd
9 changed files with 71 additions and 33 deletions

View file

@ -1,5 +1,6 @@
class Subscription < ActiveRecord::Base
attr_accessible :user_id, :conference_id
validates_uniqueness_of :user_id, scope: [:conference_id]
belongs_to :conference
belongs_to :user
end