Ruby on Rails Wednesday, January 2, 2013

I'm having this same problem. did you ever get this resolved?

On Wednesday, April 18, 2012 1:23:07 PM UTC-4, Everton Cardoso wrote:

Hi guys, I have a problem with form_for helper method.


Scenario:

My models

----------------

Org::Organization and Org::Member


routes.rb

-------------- 

namespace :org do

   resources :organizations do

       resources :members

   end

end


so, Rails creates helper methods like this: org_organization_members_path, when i tried use the form_for:


form_for [@organization, @member ] do

...

end 


it occurs the error:

ActionView::Template::Error:

       undefined method `org_organization_org_members_path' for #<#<Class:0x007ff90b3645c8>:0x007ff90b3c11b0>


Why rails is defining the helper method like org_organization_members_path and form_for is expecting org_organization_org_members_path ? 


I'm actually using rails 3.2.1.



Thanks,

Everton Cardoso

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/r7BOGGuQv28J.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment