KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm getting a error when I try to acces users#show page trough a named route (http://localhost:3000/profile/) ... otherwise I have no error when I try to access it with the standard url (http://localhost:3000/users/current). If I rake routes I routes seems right and since it works with standard url, I really have no clue why I get No route matchs error. When why trying to find route match for action 'destroy' when I'm not even trying to access it? Starcast::Application.routes.draw do match "login" => 'user_sessions#new', :as => :login match "logout" => 'user_sessions#destroy', :as => :logout resources :user_sessions match "profile" => 'users#show' resources :users resources :casters resources :casts resources :orders root :to => "home#index" end Error I get: ActionView::Template::Error (No route matches {:action=>"edit", :controller=>"users"}): 1: <% title "Welcome #{@user.username}" %> 2: 3: <%= link_to "Edit your profil", edit_user_path %> 4: 5: <% has_role? :caster do %> 6: <% if @user.caster %> app/views/users/show.html.erb:3:in `_app_views_users_show_html_erb___2116234531537545622_2170017780__3613739707062673465'
Tags (comma-separated)
Save Edits
Cancel