Reputation: 1365
I am using devise in my rails app to user sign up/in. On sign up, i want to redirect user to its profile page.
I did rake routes and for edit, root is :
/profiles/:id/edit
I wrote this in registrations controller:
def after_sign_up_path_for(resource)
'http://localhost:3000/profiles/#{resource.id}/edit'
end
But it is not working. Can anybody help?
Upvotes: 0
Views: 1184
Reputation: 11421
shouldn't you use:
def after_sign_up_path_for(resource)
edit_profile_path(resource)
end
instead of hardcoded http://localhost:3000/profiles/#{resource.id}/edit
would be helpfull to have your routes file posted too.
Upvotes: 3