I have projects and users which have a many to many relationship, in
one of my controllers I am doing the following:
@projects = @user.projects.find_all()
Whenever there is data in the projects_users I get the following
error:
LocalJumpError in DashboardController#index
no block given
e:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/active_record/
base.rb:1529:in find_all' e:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/active_record/ associations/association_proxy.rb:124:ineach’
e:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/active_record/
associations/association_proxy.rb:124:in find_all' e:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/active_record/ associations/association_proxy.rb:124:insend’
e:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/active_record/
associations/association_proxy.rb:124:in method_missing' e:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.0.1/lib/active_record/ associations/association_collection.rb:162:inmethod_missing’
app/controllers/dashboard_controller.rb:7:in index' -e:2:inload’
-e:2
I’ve been through the debugger and I can see that the expected data is
being picked up active record but I can’t quite see where this error
comes from and it’s got me stumped.
Any ideas?