<%= task.task_users.collect{|task_user| task_user.court_user.user.name} The above code throwing the following error. undefined local variable or method `task_users'' for #<#<Class:0x5e8899c>:0x5e88974> Task.rb has the following code: has_many :task_users, :dependent => :destroy This happens only in the development server. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Ayyanar Aswathaman wrote:> <%= task.task_users.collect{|task_user| task_user.court_user.user.name} > > The above code throwing the following error. > > undefined local variable or method `task_users'' for > #<#<Class:0x5e8899c>:0x5e88974> > > Task.rb has the following code: > > has_many :task_users, :dependent => :destroy > > This happens only in the development server.Ignore this one. Find the briefed one with the topic "Undefined method error " in the forums. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---