On Wednesday, August 8, 2012 1:50:06 PM UTC-5, Mohamad El-Husseini wrote: > > To make it work I had to change it to this: > > = simple_form_for :user, url: user_path(@user) do |f| > > I'm confused, i thought that is what you are trying to avoid? I.e. you don't want to have to specify user_path(@user), you wanted to just have @user and have it compute the path helper as user_path, instead of owner_path or member_path? In your solution you just put in user_path, which makes your question moot, no?
> To work with link helpers, I added this as resource: > > resources :owners, path: 'users', controller: 'users' > > Right, I didn't spell out the code like you did, but this is "As an alternative, you could also define the /owners/:id and /members/:id routes and point them at UsersController". As a note, with that set of routes defined you should be able to use your original form declaration: = simple_form_for @user do |f| Because simple_form_for will eventually do url_for(@user) like link helpers and therefore as long as owners and members are routed it should work. \Peter -- 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]. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/CCJpt_7jMZMJ. For more options, visit https://groups.google.com/groups/opt_out.

