I have three related classes, project, timesheet, and user.

project.rb
has_many :users
has_many :timesheets

timesheet.rb
belongs_to :user, :creator => true
belongs_to :project

user.rb
has_many :timesheets
has_many :projects

inside the project controller i added
auto_actions_for :timesheet, :new

if I understand this right, the has_many and belongs_to are setup
correctly. However, when I run my app it throws a You have a nil
object when you didn't expect it! The error occurred while evaluating
nil.macro. I understand other people have had this issue, but I don't
really understand the explanation. Is it that since i have more than
just one simple has_many belongs_to relationship among the three that
the relations get confused and the app doesn't know for which I want
the new auto_action done for? If this can be fixed with manual routes,
can someone please add a link to how routing works/examples for
routing becuase I have zero experience with that and barely know where
to start.

Salutations,
hobo_hippy
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to