Displaying 1 result from an estimated 1 matches for "created_events".
Did you mean:
create_event
2006 Jul 23
4
has_many AND has_many :through ?
Hi,
I am working on a scheduling app and I have a perpelextion (new word).
I am wondering if the problem is my data model
I have Users.
Users can create Events.
Users can be invited to Events created by other Users.
So...
user.rb
class User < ActiveRecord::Base
has_many :invitations # invitations to other users'' events
has_many :events, :through => :invitations # all events