> But I want also to know the roles of this ressources. How can I get now
> the roles of the ressources to this project with id 1? This doesn't
> work:
> 
>>> role = pro.roles
> 
> produces this error in the console:
> 
> NoMethodError: undefined method `roles' for #<Project:0x4dffdc0>
>         from
> c:/Ruby/lib/ruby/gems/1.8/gems/activerecord-2.3.5/lib/active_record
> /attribute_methods.rb:260:in `method_missing'
>         from (irb):47
>         from :0
> 
> Is the design of the relationship wrong or what am I missing?


I just started the ruby server again and now it's working. Maybe a .rb 
file wasn't saved or something like that.
I get now every role of every ressource that is stored in 
project_ressources.
Thx anyway.
-- 
Posted via http://www.ruby-forum.com/.
-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en.


Reply via email to