Errr, is that really belongs_to ... , :through?  You probably mean
has_many ... :through =>


On Jun 18, 12:09 pm, hobo_hippy <[email protected]> wrote:
> I simplified the relations in hopes of getting it working before i
> make them more complex, AND i still get the same error: below is the
> trace you were looking for.
>
> user.rb
>  has_many :timesheets
>  belongs_to :project, :through => :timesheets
>
> timesheet.rb
>   belongs_to :user
>   belongs_to :project
>
> project.rb
>   has_many :timesheets
>   has_many :users, :through => :timesheets
>
> what I'm shooting for here is the following:
> be able to create projects from the new timesheet page (via
> auto_actions_for :timesheets, [:new, :create] inside the project
> controller)
> eventually sort [aka group] timesheets in the timesheet view page by
> user and/or projects
>
> You have a nil object when you didn't expect it!
> The error occurred while evaluating nil.macro
>
> RAILS_ROOT: /home/domani08/home/domani08/Domanitech
> Application Trace | Framework Trace | Full Trace
>
> /usr/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/model_controller.rb:
> 261:in `auto_actions_for'
> app/controllers/projects_controller.rb:6
> config/routes.rb:6
> config/routes.rb:1
>
> /usr/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/model_controller.rb:
> 261:in `auto_actions_for'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> dependencies.rb:382:in `load_without_new_constant_marking'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> dependencies.rb:382:in `load_file'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> dependencies.rb:521:in `new_constants_in'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> dependencies.rb:381:in `load_file'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> dependencies.rb:256:in `require_or_load'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> dependencies.rb:427:in `load_missing_constant'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> dependencies.rb:77:in `const_missing'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> dependencies.rb:89:in `const_missing'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> inflector.rb:352:in `constantize'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> inflector.rb:351:in `each'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> inflector.rb:351:in `constantize'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> core_ext/string/inflections.rb:162:in `constantize'
> /usr/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/model_controller.rb:
> 61:in `all_controllers'
> /usr/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/model_controller.rb:
> 57:in `each'
> /usr/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/model_controller.rb:
> 57:in `all_controllers'
> /usr/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/model_router.rb:97:in
> `add_routes_for'
> /usr/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/model_router.rb:83:in
> `add_routes'
> /usr/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/model_router.rb:83:in
> `each'
> /usr/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/model_router.rb:83:in
> `add_routes'
> /usr/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo.rb:73:in `add_routes'
> /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> routing/route_set.rb:210:in `draw'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> dependencies.rb:142:in `load_without_new_constant_marking'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> dependencies.rb:142:in `load'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> dependencies.rb:521:in `new_constants_in'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> dependencies.rb:142:in `load'
> /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> routing/route_set.rb:255:in `load_routes!'
> /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> routing/route_set.rb:236:in `load!'
> /usr/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/model_router.rb:10:in
> `reload_without_hobo_assemble'
> /usr/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/model_router.rb:22:in
> `reload'
> /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> dispatcher.rb:148:in `reload_application_without_dryml_generators'
> /usr/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/dryml/
> dryml_generator.rb:40:in `reload_application'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> callbacks.rb:178:in `send'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> callbacks.rb:178:in `evaluate_method'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> callbacks.rb:166:in `call'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> callbacks.rb:90:in `run'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> callbacks.rb:90:in `each'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> callbacks.rb:90:in `send'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> callbacks.rb:90:in `run'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> callbacks.rb:277:in `run_callbacks'
> /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> dispatcher.rb:109:in `dispatch_unlocked'
> /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> dispatcher.rb:123:in `dispatch'
> /usr/lib/ruby/1.8/thread.rb:135:in `synchronize'
> /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> dispatcher.rb:122:in `dispatch'
> /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> dispatcher.rb:132:in `dispatch_cgi'
> /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> dispatcher.rb:39:in `dispatch'
> /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/fcgi_handler.rb:101:in
> `process_request'
> /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/fcgi_handler.rb:151:in
> `with_signal_handler'
> /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/fcgi_handler.rb:99:in
> `process_request'
> /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/fcgi_handler.rb:76:in
> `process_each_request'
> /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:612:in `each_cgi'
> /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:117:in `session'
> /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:104:in
> `each_request'
> /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:36:in `each'
> /usr/lib/ruby/gems/1.8/gems/fcgi-0.8.7/lib/fcgi.rb:609:in `each_cgi'
> /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/fcgi_handler.rb:75:in
> `process_each_request'
> /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/fcgi_handler.rb:74:in
> `catch'
> /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/fcgi_handler.rb:74:in
> `process_each_request'
> /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/fcgi_handler.rb:49:in
> `process!'
> /usr/lib/ruby/gems/1.8/gems/rails-2.2.2/lib/fcgi_handler.rb:23:in
> `process!'
> dispatch.fcgi:24
>
> /usr/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/model_controller.rb:
> 261:in `auto_actions_for'
> app/controllers/projects_controller.rb:6
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> dependencies.rb:382:in `load_without_new_constant_marking'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> dependencies.rb:382:in `load_file'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> dependencies.rb:521:in `new_constants_in'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> dependencies.rb:381:in `load_file'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> dependencies.rb:256:in `require_or_load'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> dependencies.rb:427:in `load_missing_constant'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> dependencies.rb:77:in `const_missing'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> dependencies.rb:89:in `const_missing'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> inflector.rb:352:in `constantize'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> inflector.rb:351:in `each'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> inflector.rb:351:in `constantize'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> core_ext/string/inflections.rb:162:in `constantize'
> /usr/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/model_controller.rb:
> 61:in `all_controllers'
> /usr/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/model_controller.rb:
> 57:in `each'
> /usr/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/model_controller.rb:
> 57:in `all_controllers'
> /usr/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/model_router.rb:97:in
> `add_routes_for'
> /usr/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/model_router.rb:83:in
> `add_routes'
> /usr/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/model_router.rb:83:in
> `each'
> /usr/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/model_router.rb:83:in
> `add_routes'
> /usr/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo.rb:73:in `add_routes'
> config/routes.rb:6
> /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> routing/route_set.rb:210:in `draw'
> config/routes.rb:1
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> dependencies.rb:142:in `load_without_new_constant_marking'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> dependencies.rb:142:in `load'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> dependencies.rb:521:in `new_constants_in'
> /usr/lib/ruby/gems/1.8/gems/activesupport-2.2.2/lib/active_support/
> dependencies.rb:142:in `load'
> /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> routing/route_set.rb:255:in `load_routes!'
> /usr/lib/ruby/gems/1.8/gems/actionpack-2.2.2/lib/action_controller/
> routing/route_set.rb:236:in `load!'
> /usr/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/model_router.rb:10:in
> `reload_without_hobo_assemble'
> /usr/lib/ruby/gems/1.8/gems/hobo-0.8.7/lib/hobo/model_router.rb:22:in
> `reload' ...
>
> read more »
--~--~---------~--~----~------------~-------~--~----~
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