Rails route problem -
class userscontroller < applicationcontroller def edit ... end
mu routes.rb
match '/user/:id/profile/edit', :to => 'users#edit', :as => "user_profile_edit", :via => "get"
my link:
<%= link_to image_tag("icons/run.png"), user_profile_edit_path %>
exception:
no route matches {:controller=>"users", :action=>"edit"}
what i'm doing wrong? thanks.
you need supply user record. assuming record assigned @user
<%= link_to image_tag("icons/run.png"), user_profile_edit_path(@user) %>
Comments
Post a Comment