Skip to content

Instantly share code, notes, and snippets.

@krasio
Created June 17, 2010 17:27
Show Gist options
  • Save krasio/442433 to your computer and use it in GitHub Desktop.
Save krasio/442433 to your computer and use it in GitHub Desktop.
# app/models/user.rb
class User
include Mongoid::Document
# Include default devise modules. Others available are:
# :token_authenticatable, :confirmable, :lockable and :timeoutable
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
end
# config/routes.rb
Myapp::Application.routes.draw do |map|
devise_for :users
end
# rake routes
# new_user_session GET /users/sign_in {:controller=>"devise/sessions", :action=>"new"}
# user_session POST /users/sign_in {:controller=>"devise/sessions", :action=>"create"}
# destroy_user_session GET /users/sign_out {:controller=>"devise/sessions", :action=>"destroy"}
# POST /users/password(.:format) {:controller=>"devise/passwords", :action=>"create"}
# new_user_password GET /users/password/new(.:format) {:controller=>"devise/passwords", :action=>"new"}
# PUT /users/password(.:format) {:controller=>"devise/passwords", :action=>"update"}
# edit_user_password GET /users/password/edit(.:format) {:controller=>"devise/passwords", :action=>"edit"}
# POST /users(.:format) {:controller=>"devise/registrations", :action=>"create"}
# new_user_registration GET /users/sign_up(.:format) {:controller=>"devise/registrations", :action=>"new"}
# PUT /users(.:format) {:controller=>"devise/registrations", :action=>"update"}
# DELETE /users(.:format) {:controller=>"devise/registrations", :action=>"destroy"}
#edit_user_registration GET /users/edit(.:format) {:controller=>"devise/registrations", :action=>"edit"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment