在users_controller.rb我有我的方法:
def showallusers
@users = User.all
respond_to do |format|
format.html # showallusers.html.erb
format.json { render :json => @users }
end
end
在app/views/users我有showallusers.html.erb并在其中:
<p>test</p>
但是当我输入
http://localhost:3000/users/showallusers
在浏览器中,它向我显示show.html.erb。
我的路线.rb
resources :users
resources :projects do
resources :issues
end
#resources :issues
resources :projects
resources :sessions
root :to => "users#index"
match "/auth/:provider/callback" => "sessions#create"
match "/signout" => "sessions#destroy", :as => :signout
你知道,出了什么问题,我该如何解决?谢谢