ruby on rails - How to show my profile page using devise? -
i have devise model default fields email , password, , few more manually added full name, age, etc... i'd have page shows profile details i'm not seeing how can this.
somewhere in application.html view :
any appreciated
controller
class yourscontroller < applicationcontroller def profile @account = current_account end end
route
get "myprofile" => "yours#profile", :as => :myprofile
view /yours/profile.html.erb
<%= @account.email %> <%= @account.etc %>
link current profile
<%= link_to "my profile", myprofile_path %>
Comments
Post a Comment