Reputation: 1617
I have a settings tab which links to the user to edit_user_registrations_path
corresponding to the devise/registrations/edit.html.erb page.
I created another page under devise/registrations called edit_account.html.erb and I'd like this to allow the user to edit additional settings like Twitter and any other social networks that allow it.
I keep getting a routing error. This is the route I tried using with no luck:
devise_scope :user do get "/edit/edit_account" => "devise/registrations#edit_account" end
Thanks in advance!
Upvotes: 0
Views: 61
Reputation: 7921
The way I do it in my routes file is like this:
devise_scope :user do
put "edit/edit_account", :to => "devise/registrations#edit_account",
:as => "edit_account"
end
and then like this:
<%= simple_form_for(resource, :as => resource_name, :url => edit_account_path(resource_name), :html => { :method => :put }) do |f| %>
Upvotes: 1