Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Users controller and Routes
#Controller
class UsersController < ApplicationController
before_filter :authenticate_user!
def show
@user=User.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.json { render json: @user }
end
end
end
#Routes
root :to => "home#index"
match '/users', :to => "users#show"
devise_for :users
resources :users
resources :tools
get "pages/feedback"
get "/tools/index" => "tools#index", :as => "browse"
get "about" => "pages#about", :as => "about"
get "contact" => "pages#contact_us", :as => "contact"
get "feedback" => "pages#feedback", :as => "feedback"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.