Skip to content
This repository
Newer
Older
100644 388 lines (247 sloc) 15.491 kb
a71a3528 » josevalim
2012-01-26 Release 2.0.0
1 *IMPORTANT:* Devise 2.0.0 is out. If you are upgrading, please read: https://github.com/plataformatec/devise/wiki/How-To:-Upgrade-to-Devise-2.0
b71028dc » josevalim
2011-12-19 Add a note to the README.
2
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
3 ## Devise
673fda97 » josevalim
2009-09-16 First commit.
4
222e606f » Rodrigo Flores
2012-02-03 Added a documentup link on README
5 INFO: This README is [also available in a friendly navigable format](http://devise.plataformatec.com.br/).
6
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
7 [![Build Status](https://secure.travis-ci.org/plataformatec/devise.png)](http://travis-ci.org/plataformatec/devise)
538c16cd » Rodrigo Flores
2011-11-06 Added CI status to the README
8
493f91fd » carlosantoniodasilva
2009-10-13 Readme updates.
9 Devise is a flexible authentication solution for Rails based on Warden. It:
10
11 * Is Rack based;
12 * Is a complete MVC solution based on Rails engines;
13 * Allows you to have multiple roles (or models/scopes) signed in at the same time;
14 * Is based on a modularity concept: use just what you really need.
15
a729e059 » rumblestrut
2011-08-10 Changed "It's composed of 12 modules:" to "It's comprised of 12 modul…
16 It's comprised of 12 modules:
493f91fd » carlosantoniodasilva
2009-10-13 Readme updates.
17
f06bed27 » Nico Ritsche
2011-02-06 corrected 'an user' to 'a user' in comments and docs
18 * Database Authenticatable: encrypts and stores a password in the database to validate the authenticity of a user while signing in. The authentication can be done both through POST requests or HTTP Basic Authentication.
fdb4cd5b » trevorturk
2010-09-22 Major update to README - encourage use of the Wiki
19 * Token Authenticatable: signs in a user based on an authentication token (also known as "single access token"). The token can be given both through query string or HTTP Basic Authentication.
3d1152fb » josevalim
2010-10-15 Update README and CHANGELOG.
20 * Omniauthable: adds Omniauth (github.com/intridea/omniauth) support;
5c59f4cd » fortuity
2010-02-27 Fixes to syntax, diction and spelling in README.
21 * Confirmable: sends emails with confirmation instructions and verifies whether an account is already confirmed during sign in.
22 * Recoverable: resets the user password and sends reset instructions.
08c51798 » josevalim
2010-05-11 Update registerable on readme.
23 * Registerable: handles signing up users through a registration process, also allowing them to edit and destroy their account.
5c59f4cd » fortuity
2010-02-27 Fixes to syntax, diction and spelling in README.
24 * Rememberable: manages generating and clearing a token for remembering the user from a saved cookie.
25 * Trackable: tracks sign in count, timestamps and IP address.
26 * Timeoutable: expires sessions that have no activity in a specified period of time.
27 * Validatable: provides validations of email and password. It's optional and can be customized, so you're able to define your own validations.
28 * Lockable: locks an account after a specified number of failed sign-in attempts. Can unlock via email or after a specified time period.
2305e8f8 » josevalim
2010-11-30 Improve README.
29 * Encryptable: adds support of other authentication mechanisms besides the built-in Bcrypt (the default).
673fda97 » josevalim
2009-09-16 First commit.
30
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
31 ## Information
493f91fd » carlosantoniodasilva
2009-10-13 Readme updates.
32
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
33 ### The Devise wiki
2fe1a69b » josevalim
2009-10-21 Added jeweler to rakefile and version.
34
fdb4cd5b » trevorturk
2010-09-22 Major update to README - encourage use of the Wiki
35 The Devise Wiki has lots of additional information about Devise including many "how-to" articles and answers to the most frequently asked questions. Please browse the Wiki after finishing this README:
84c34ff0 » josevalim
2010-06-28 Be more specific about master.
36
13ed2183 » Andrey Korobkov
2011-10-13 many typos (http -> https)
37 https://wiki.github.com/plataformatec/devise
6f450d7a » carlosantoniodasilva
2009-10-21 Fix requiring devise mapping, and adding some documentation about rou…
38
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
39 ### Bug reports
3432c9ee » josevalim
2009-12-12 Simplify autoload stack.
40
fdb4cd5b » trevorturk
2010-09-22 Major update to README - encourage use of the Wiki
41 If you discover a problem with Devise, we would like to know about it. However, we ask that you please review these guidelines before submitting a bug report:
7c82d3ee » josevalim
2010-05-21 Move the generator bit to the top.
42
13ed2183 » Andrey Korobkov
2011-10-13 many typos (http -> https)
43 https://github.com/plataformatec/devise/wiki/Bug-reports
7c82d3ee » josevalim
2010-05-21 Move the generator bit to the top.
44
971f68f9 » joliss
2011-01-15 README: Call the Google Group a mailing list; merge Testing section i…
45 If you found a security bug, do *NOT* use the GitHub issue tracker. Send email or a private GitHub message to the maintainers listed at the bottom of the README.
fdb4cd5b » trevorturk
2010-09-22 Major update to README - encourage use of the Wiki
46
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
47 ### Mailing list
0bd75469 » josevalim
2010-04-05 Update README.
48
971f68f9 » joliss
2011-01-15 README: Call the Google Group a mailing list; merge Testing section i…
49 If you have any questions, comments, or concerns, please use the Google Group instead of the GitHub issue tracker:
6d6633d1 » josevalim
2010-02-17 Release 1.1.pre which is Rails 3 compatible.
50
13ed2183 » Andrey Korobkov
2011-10-13 many typos (http -> https)
51 https://groups.google.com/group/plataformatec-devise
fdb4cd5b » trevorturk
2010-09-22 Major update to README - encourage use of the Wiki
52
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
53 ### RDocs
fdb4cd5b » trevorturk
2010-09-22 Major update to README - encourage use of the Wiki
54
55 You can view the Devise documentation in RDoc format here:
56
57 http://rubydoc.info/github/plataformatec/devise/master/frames
6d6633d1 » josevalim
2010-02-17 Release 1.1.pre which is Rails 3 compatible.
58
b061f985 » josevalim
2012-01-27 Update README to remove reference to old migration helpers.
59 If you need to use Devise with Rails 2.3, you can always run "gem server" from the command line after you install the gem to access the old documentation.
6d6633d1 » josevalim
2010-02-17 Release 1.1.pre which is Rails 3 compatible.
60
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
61 ### Example applications
6d6633d1 » josevalim
2010-02-17 Release 1.1.pre which is Rails 3 compatible.
62
fdb4cd5b » trevorturk
2010-09-22 Major update to README - encourage use of the Wiki
63 There are a few example applications available on GitHub that demonstrate various features of Devise with different versions of Rails. You can view them here:
6d6633d1 » josevalim
2010-02-17 Release 1.1.pre which is Rails 3 compatible.
64
13ed2183 » Andrey Korobkov
2011-10-13 many typos (http -> https)
65 https://github.com/plataformatec/devise/wiki/Example-Applications
1db86a08 » josevalim
2010-04-15 More information about ecosystem in the README.
66
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
67 ### Extensions
1db86a08 » josevalim
2010-04-15 More information about ecosystem in the README.
68
fdb4cd5b » trevorturk
2010-09-22 Major update to README - encourage use of the Wiki
69 Our community has created a number of extensions that add functionality above and beyond what is included with Devise. You can view a list of available extensions and add your own here:
1db86a08 » josevalim
2010-04-15 More information about ecosystem in the README.
70
13ed2183 » Andrey Korobkov
2011-10-13 many typos (http -> https)
71 https://github.com/plataformatec/devise/wiki/Extensions
1db86a08 » josevalim
2010-04-15 More information about ecosystem in the README.
72
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
73 ### Contributing
fdb4cd5b » trevorturk
2010-09-22 Major update to README - encourage use of the Wiki
74
75 We hope that you will consider contributing to Devise. Please read this short overview for some information about how to get started:
76
13ed2183 » Andrey Korobkov
2011-10-13 many typos (http -> https)
77 https://github.com/plataformatec/devise/wiki/Contributing
fdb4cd5b » trevorturk
2010-09-22 Major update to README - encourage use of the Wiki
78
b061f985 » josevalim
2012-01-27 Update README to remove reference to old migration helpers.
79 You will usually want to write tests for your changes. To run the test suite, go into Devise's top-level directory and run "bundle install" and "rake". For the tests to pass, you will need to have a MongoDB server (version 2.0 or newer) running on your system.
f96061b3 » josevalim
2010-09-24 Update docs and CHANGELOG based on the 1.1.3 release from v1.1 branch.
80
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
81 ## Starting with Rails?
5f93d835 » josevalim
2011-01-31 A tip for newcommers.
82
76a48004 » josevalim
2011-01-31 Words.
83 If you are building your first Rails application, we recommend you to *not* use Devise. Devise requires a good understanding of the Rails Framework. In such cases, we advise you to start a simple authentication system from scratch, today we have two resources:
5f93d835 » josevalim
2011-01-31 A tip for newcommers.
84
85 * Michael Hartl's online book: http://railstutorial.org/chapters/modeling-and-viewing-users-two#top
86 * Ryan Bates' Railscast: http://railscasts.com/episodes/250-authentication-from-scratch
87
762f3907 » waynn
2011-07-11 quick typo fix
88 Once you have solidified your understanding of Rails and authentication mechanisms, we assure you Devise will be very pleasant to work with. :)
5f93d835 » josevalim
2011-01-31 A tip for newcommers.
89
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
90 ## Getting started
493f91fd » carlosantoniodasilva
2009-10-13 Readme updates.
91
dfcf8257 » ysiadf
2012-01-27 Update README.doc to specify adding devise to the Gemfile.
92 Devise 2.0 works with Rails 3.1 onwards. You can add it to your Gemfile with:
cb285bf7 » carlosantoniodasilva
2009-10-15 Updating readme with missing migration info.
93
dfcf8257 » ysiadf
2012-01-27 Update README.doc to specify adding devise to the Gemfile.
94 gem 'devise'
95
96 Run the bundle command to install it.
d26f90f7 » carlosantoniodasilva
2009-10-20 Updating docs and TODO.
97
b061f985 » josevalim
2012-01-27 Update README to remove reference to old migration helpers.
98 After you install Devise and add it to your Gemfile, you need to run the generator:
493f91fd » carlosantoniodasilva
2009-10-13 Readme updates.
99
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
100 ```console
101 rails generate devise:install
102 ```
493f91fd » carlosantoniodasilva
2009-10-13 Readme updates.
103
b061f985 » josevalim
2012-01-27 Update README to remove reference to old migration helpers.
104 The generator will install an initializer which describes ALL Devise's configuration options and you MUST take a look at it. When you are done, you are ready to add Devise to any of your models using the generator:
493f91fd » carlosantoniodasilva
2009-10-13 Readme updates.
105
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
106 ```console
107 rails generate devise MODEL
108 ```
493f91fd » carlosantoniodasilva
2009-10-13 Readme updates.
109
b061f985 » josevalim
2012-01-27 Update README to remove reference to old migration helpers.
110 Replace MODEL by the class name used for the applications users, it's frequently 'User' but could also be 'Admin'. This will create a model (if one does not exist) and configure it with default Devise modules. Next, you'll usually run "rake db:migrate" as the generator will have created a migration file (if your ORM supports them). This generator also configures your config/routes.rb file to point to Devise controller.
efc0ae23 » josevalim
2010-01-13 Deprecate :all.
111
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
112 ### Controller filters and helpers
3209e7d9 » josevalim
2009-10-30 Renamed confirm_in to confirm_within.
113
5c59f4cd » fortuity
2010-02-27 Fixes to syntax, diction and spelling in README.
114 Devise will create some helpers to use inside your controllers and views. To set up a controller with user authentication, just add this before_filter:
493f91fd » carlosantoniodasilva
2009-10-13 Readme updates.
115
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
116 ```ruby
117 before_filter :authenticate_user!
118 ```
493f91fd » carlosantoniodasilva
2009-10-13 Readme updates.
119
5c59f4cd » fortuity
2010-02-27 Fixes to syntax, diction and spelling in README.
120 To verify if a user is signed in, use the following helper:
493f91fd » carlosantoniodasilva
2009-10-13 Readme updates.
121
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
122 ```ruby
123 user_signed_in?
124 ```
493f91fd » carlosantoniodasilva
2009-10-13 Readme updates.
125
5c59f4cd » fortuity
2010-02-27 Fixes to syntax, diction and spelling in README.
126 For the current signed-in user, this helper is available:
493f91fd » carlosantoniodasilva
2009-10-13 Readme updates.
127
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
128 ```ruby
129 current_user
130 ```
493f91fd » carlosantoniodasilva
2009-10-13 Readme updates.
131
5c59f4cd » fortuity
2010-02-27 Fixes to syntax, diction and spelling in README.
132 You can access the session for this scope:
cce3f58e » carlosantoniodasilva
2009-10-18 Fix typo and filter info in readme.
133
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
134 ```ruby
135 user_session
136 ```
cce3f58e » carlosantoniodasilva
2009-10-18 Fix typo and filter info in readme.
137
b061f985 » josevalim
2012-01-27 Update README to remove reference to old migration helpers.
138 After signing in a user, confirming the account or updating the password, Devise will look for a scoped root path to redirect. Example: For a :user resource, it will use +user_root_path+ if it exists, otherwise default +root_path+ will be used. This means that you need to set the root inside your routes:
6f450d7a » carlosantoniodasilva
2009-10-21 Fix requiring devise mapping, and adding some documentation about rou…
139
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
140 ```ruby
141 root :to => "home#index"
142 ```
6f450d7a » carlosantoniodasilva
2009-10-21 Fix requiring devise mapping, and adding some documentation about rou…
143
b061f985 » josevalim
2012-01-27 Update README to remove reference to old migration helpers.
144 You can also overwrite +after_sign_in_path_for+ and +after_sign_out_path_for+ to customize your redirect hooks.
d445b4be » josevalim
2009-11-19 Create after_sign_in_path_for and after_sign_out_path_for hooks and s…
145
b061f985 » josevalim
2012-01-27 Update README to remove reference to old migration helpers.
146 Finally, you need to set up default url options for the mailer in each environment. Here is the configuration for "config/environments/development.rb":
6f450d7a » carlosantoniodasilva
2009-10-21 Fix requiring devise mapping, and adding some documentation about rou…
147
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
148 ```ruby
149 config.action_mailer.default_url_options = { :host => 'localhost:3000' }
150 ```
fc08a7c5 » carlosantoniodasilva
2009-10-19 Changing resource_home_path to resource_root_path and add the same re…
151
67645c68 » josevalim
2010-11-15 Move extra helpers names to the bottom.
152 Notice that if your devise model is not called "user" but "member", then the helpers you should use are:
153
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
154 ```ruby
155 before_filter :authenticate_member!
67645c68 » josevalim
2010-11-15 Move extra helpers names to the bottom.
156
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
157 member_signed_in?
67645c68 » josevalim
2010-11-15 Move extra helpers names to the bottom.
158
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
159 current_member
67645c68 » josevalim
2010-11-15 Move extra helpers names to the bottom.
160
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
161 member_session
162 ```
67645c68 » josevalim
2010-11-15 Move extra helpers names to the bottom.
163
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
164 ### Configuring Models
fdb4cd5b » trevorturk
2010-09-22 Major update to README - encourage use of the Wiki
165
b061f985 » josevalim
2012-01-27 Update README to remove reference to old migration helpers.
166 The devise method in your models also accepts some options to configure its modules. For example, you can choose the cost of the encryption algorithm with:
fdb4cd5b » trevorturk
2010-09-22 Major update to README - encourage use of the Wiki
167
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
168 ```ruby
169 devise :database_authenticatable, :registerable, :confirmable, :recoverable, :stretches => 20
170 ```
fdb4cd5b » trevorturk
2010-09-22 Major update to README - encourage use of the Wiki
171
09088706 » josevalim
2010-09-25 Extract encryptors into their own module for better bcrypt support.
172 Besides :stretches, you can define :pepper, :encryptor, :confirm_within, :remember_for, :timeout_in, :unlock_in and other values. For details, see the initializer file that was created when you invoked the "devise:install" generator described above.
fdb4cd5b » trevorturk
2010-09-22 Major update to README - encourage use of the Wiki
173
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
174 ### Configuring multiple models
3209e7d9 » josevalim
2009-10-30 Renamed confirm_in to confirm_within.
175
b061f985 » josevalim
2012-01-27 Update README to remove reference to old migration helpers.
176 Devise allows you to set up as many roles as you want. For example, you may have a User model and also want an Admin model with just authentication and timeoutable features. If so, just follow these steps:
493f91fd » carlosantoniodasilva
2009-10-13 Readme updates.
177
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
178 ```ruby
179 # Create a migration with the required fields
180 create_table :admins do |t|
181 t.string :email
182 t.string :encrypted_password
183 t.timestamps
184 end
9feb9455 » josevalim
2009-10-18 Allow page after sign in to be configured.
185
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
186 # Inside your Admin model
187 devise :database_authenticatable, :timeoutable
9feb9455 » josevalim
2009-10-18 Allow page after sign in to be configured.
188
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
189 # Inside your routes
190 devise_for :admins
9feb9455 » josevalim
2009-10-18 Allow page after sign in to be configured.
191
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
192 # Inside your protected controller
193 before_filter :authenticate_admin!
9feb9455 » josevalim
2009-10-18 Allow page after sign in to be configured.
194
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
195 # Inside your controllers and views
196 admin_signed_in?
197 current_admin
198 admin_session
199 ```
493f91fd » carlosantoniodasilva
2009-10-13 Readme updates.
200
b061f985 » josevalim
2012-01-27 Update README to remove reference to old migration helpers.
201 On the other hand, you can simply run the generator!
202
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
203 ### Configuring views
efc0ae23 » josevalim
2010-01-13 Deprecate :all.
204
bf63824a » josevalim
2010-04-12 Improve wording in the README.
205 We built Devise to help you quickly develop an application that uses authentication. However, we don't want to be in your way when you need to customize it.
0a317c96 » carlosantoniodasilva
2009-10-23 README with some Generators info.
206
13bd4ce4 » pcantrell
2012-01-11 Grammar fix.
207 Since Devise is an engine, all its views are packaged inside the gem. These views will help you get started, but after some time you may want to change them. If this is the case, you just need to invoke the following generator, and it will copy all views to your application:
0a317c96 » carlosantoniodasilva
2009-10-23 README with some Generators info.
208
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
209 ```console
210 rails generate devise:views
211 ```
efc0ae23 » josevalim
2010-01-13 Deprecate :all.
212
eb3118e8 » josevalim
2010-07-15 Add OAuth2 documentation.
213 If you have more than one role in your application (such as "User" and "Admin"), you will notice that Devise uses the same views for all roles. Fortunately, Devise offers an easy way to customize views. All you need to do is set "config.scoped_views = true" inside "config/initializers/devise.rb".
214
215 After doing so, you will be able to have views based on the role like "users/sessions/new" and "admins/sessions/new". If no view is found within the scope, Devise will use the default view at "devise/sessions/new". You can also use the generator to generate scoped views:
216
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
217 ```console
218 rails generate devise:views users
219 ```
f6cc2192 » josevalim
2010-02-17 Devise now allows you to have custom controlleers. Check the README f…
220
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
221 ### Configuring controllers
f6cc2192 » josevalim
2010-02-17 Devise now allows you to have custom controlleers. Check the README f…
222
bf63824a » josevalim
2010-04-12 Improve wording in the README.
223 If the customization at the views level is not enough, you can customize each controller by following these steps:
224
225 1) Create your custom controller, for example a Admins::SessionsController:
f6cc2192 » josevalim
2010-02-17 Devise now allows you to have custom controlleers. Check the README f…
226
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
227 ```ruby
228 class Admins::SessionsController < Devise::SessionsController
229 end
230 ```
f6cc2192 » josevalim
2010-02-17 Devise now allows you to have custom controlleers. Check the README f…
231
bf63824a » josevalim
2010-04-12 Improve wording in the README.
232 2) Tell the router to use this controller:
f6cc2192 » josevalim
2010-02-17 Devise now allows you to have custom controlleers. Check the README f…
233
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
234 ```ruby
235 devise_for :admins, :controllers => { :sessions => "admins/sessions" }
236 ```
f6cc2192 » josevalim
2010-02-17 Devise now allows you to have custom controlleers. Check the README f…
237
bf63824a » josevalim
2010-04-12 Improve wording in the README.
238 3) And since we changed the controller, it won't use the "devise/sessions" views, so remember to copy "devise/sessions" to "admin/sessions".
f6cc2192 » josevalim
2010-02-17 Devise now allows you to have custom controlleers. Check the README f…
239
5c59f4cd » fortuity
2010-02-27 Fixes to syntax, diction and spelling in README.
240 Remember that Devise uses flash messages to let users know if sign in was successful or failed. Devise expects your application to call "flash[:notice]" and "flash[:alert]" as appropriate.
6d29bcc4 » paulca
2010-02-15 Add mention of flash[:notice] and flash[:alert]
241
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
242 ### Configuring routes
a36cb6e7 » josevalim
2010-07-19 Improve docs for routes customization.
243
244 Devise also ships with default routes. If you need to customize them, you should probably be able to do it through the devise_for method. It accepts several options like :class_name, :path_prefix and so on, including the possibility to change path names for I18n:
245
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
246 ```ruby
247 devise_for :users, :path => "usuarios", :path_names => { :sign_in => 'login', :sign_out => 'logout', :password => 'secret', :confirmation => 'verification', :unlock => 'unblock', :registration => 'register', :sign_up => 'cmon_let_me_in' }
248 ```
a36cb6e7 » josevalim
2010-07-19 Improve docs for routes customization.
249
b061f985 » josevalim
2012-01-27 Update README to remove reference to old migration helpers.
250 Be sure to check +devise_for+ documentation for details.
a36cb6e7 » josevalim
2010-07-19 Improve docs for routes customization.
251
252 If you have the need for more deep customization, for instance to also allow "/sign_in" besides "/users/sign_in", all you need to do is to create your routes normally and wrap them in a +devise_scope+ block in the router:
253
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
254 ```ruby
255 devise_scope :user do
256 get "sign_in", :to => "devise/sessions#new"
257 end
258 ```
c0c7aefc » josevalim
2010-08-02 Smallish update to README.
259
260 This way you tell devise to use the scope :user when "/sign_in" is accessed. Notice +devise_scope+ is also aliased as +as+ and you can also give a block to +devise_for+, resulting in the same behavior:
261
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
262 ```ruby
263 devise_for :users do
264 get "sign_in", :to => "devise/sessions#new"
265 end
266 ```
a36cb6e7 » josevalim
2010-07-19 Improve docs for routes customization.
267
c0c7aefc » josevalim
2010-08-02 Smallish update to README.
268 Feel free to choose the one you prefer!
a36cb6e7 » josevalim
2010-07-19 Improve docs for routes customization.
269
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
270 ### I18n
0eb8b3b7 » carlosantoniodasilva
2009-10-20 Mailer subjects namespaced by model
271
c3d92095 » Juanmcuello
2011-04-17 Update README.
272 Devise uses flash messages with I18n with the flash keys :notice and :alert. To customize your app, you can set up your locale file:
0eb8b3b7 » carlosantoniodasilva
2009-10-20 Mailer subjects namespaced by model
273
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
274 ```yaml
275 en:
276 devise:
277 sessions:
278 signed_in: 'Signed in successfully.'
279 ```
0eb8b3b7 » carlosantoniodasilva
2009-10-20 Mailer subjects namespaced by model
280
475da069 » josevalim
2009-10-29 Make ActionMailer and ActionController more consistent by always usin…
281 You can also create distinct messages based on the resource you've configured using the singular name given in routes:
0eb8b3b7 » carlosantoniodasilva
2009-10-20 Mailer subjects namespaced by model
282
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
283 ```yaml
284 en:
285 devise:
286 sessions:
287 user:
288 signed_in: 'Welcome user, you are signed in.'
289 admin:
290 signed_in: 'Hello admin!'
291 ```
0eb8b3b7 » carlosantoniodasilva
2009-10-20 Mailer subjects namespaced by model
292
eb3118e8 » josevalim
2010-07-15 Add OAuth2 documentation.
293 The Devise mailer uses a similar pattern to create subject messages:
0eb8b3b7 » carlosantoniodasilva
2009-10-20 Mailer subjects namespaced by model
294
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
295 ```yaml
296 en:
297 devise:
298 mailer:
299 confirmation_instructions:
300 subject: 'Hello everybody!'
301 user_subject: 'Hello User! Please confirm your email'
302 reset_password_instructions:
303 subject: 'Reset instructions'
304 ```
0eb8b3b7 » carlosantoniodasilva
2009-10-20 Mailer subjects namespaced by model
305
fdb4cd5b » trevorturk
2010-09-22 Major update to README - encourage use of the Wiki
306 Take a look at our locale file to check all available messages. You may also be interested in one of the many translations that are available on our wiki:
0eb8b3b7 » carlosantoniodasilva
2009-10-20 Mailer subjects namespaced by model
307
13ed2183 » Andrey Korobkov
2011-10-13 many typos (http -> https)
308 https://github.com/plataformatec/devise/wiki/I18n
fdb4cd5b » trevorturk
2010-09-22 Major update to README - encourage use of the Wiki
309
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
310 ### Test helpers
97a7f0ed » josevalim
2009-11-16 Added test helpers.
311
d9fbdff1 » josevalim
2009-12-07 More testing info in README.
312 Devise includes some tests helpers for functional specs. To use them, you just need to include Devise::TestHelpers in your test class and use the sign_in and sign_out method. Such methods have the same signature as in controllers:
97a7f0ed » josevalim
2009-11-16 Added test helpers.
313
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
314 ```ruby
315 sign_in :user, @user # sign_in(scope, resource)
316 sign_in @user # sign_in(resource)
97a7f0ed » josevalim
2009-11-16 Added test helpers.
317
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
318 sign_out :user # sign_out(scope)
319 sign_out @user # sign_out(resource)
320 ```
97a7f0ed » josevalim
2009-11-16 Added test helpers.
321
2d67432c » pat
2010-07-27 Expanding on testing docs a little to be more useful for those using …
322 You can include the Devise Test Helpers in all of your tests by adding the following to the bottom of your test/test_helper.rb file:
529cd8b0 » trevorturk
2009-11-20 Add example for including Devise::TestHelpers in all functional tests…
323
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
324 ```ruby
325 class ActionController::TestCase
326 include Devise::TestHelpers
327 end
328 ```
529cd8b0 » trevorturk
2009-11-20 Add example for including Devise::TestHelpers in all functional tests…
329
fd35b36c » pat
2010-07-27 Presumed Markdown syntax - switching inline code to RDoc.
330 If you're using RSpec and want the helpers automatically included within all +describe+ blocks, add a file called spec/support/devise.rb with the following contents:
2d67432c » pat
2010-07-27 Expanding on testing docs a little to be more useful for those using …
331
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
332 ```ruby
333 RSpec.configure do |config|
334 config.include Devise::TestHelpers, :type => :controller
335 end
336 ```
2d67432c » pat
2010-07-27 Expanding on testing docs a little to be more useful for those using …
337
13ed2183 » Andrey Korobkov
2011-10-13 many typos (http -> https)
338 Do not use such helpers for integration tests such as Cucumber or Webrat. Instead, fill in the form or explicitly set the user in session. For more tips, check the wiki (https://wiki.github.com/plataformatec/devise).
d9fbdff1 » josevalim
2009-12-07 More testing info in README.
339
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
340 ### Omniauth
1db86a08 » josevalim
2010-04-15 More information about ecosystem in the README.
341
1f51524b » josevalim
2011-04-11 Edited README.rdoc via GitHub
342 Devise comes with Omniauth support out of the box to authenticate from other providers. You can read more about Omniauth support in the wiki:
9d6a78f7 » josevalim
2010-04-22 Add ldap_authenticatable to README.
343
1f51524b » josevalim
2011-04-11 Edited README.rdoc via GitHub
344 * https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview
6754ae76 » josevalim
2010-08-17 Update README.
345
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
346 ### Other ORMs
f96061b3 » josevalim
2010-09-24 Update docs and CHANGELOG based on the 1.1.3 release from v1.1 branch.
347
348 Devise supports ActiveRecord (default) and Mongoid. To choose other ORM, you just need to require it in the initializer file.
349
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
350 ### Migrating from other solutions
1db86a08 » josevalim
2010-04-15 More information about ecosystem in the README.
351
09088706 » josevalim
2010-09-25 Extract encryptors into their own module for better bcrypt support.
352 Devise implements encryption strategies for Clearance, Authlogic and Restful-Authentication. To make use of these strategies, you need set the desired encryptor in the encryptor initializer config option and add :encryptable to your model. You might also need to rename your encrypted password and salt columns to match Devise's fields (encrypted_password and password_salt).
238226e3 » carlosantoniodasilva
2010-07-05 Adding a small note about security and issues
353
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
354 ## Troubleshooting
52282a5a » avocade
2011-10-10 Update README with troubleshooting for heroku
355
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
356 ### Heroku
52282a5a » avocade
2011-10-10 Update README with troubleshooting for heroku
357
358 Using devise on Heroku with Ruby on Rails 3.1 requires setting:
359
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
360 ```ruby
361 config.assets.initialize_on_precompile = false
362 ```
52282a5a » avocade
2011-10-10 Update README with troubleshooting for heroku
363
364 Read more about the potential issues at http://guides.rubyonrails.org/asset_pipeline.html
365
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
366 ## Additional information
238226e3 » carlosantoniodasilva
2010-07-05 Adding a small note about security and issues
367
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
368 ### Warden
6d09eb66 » josevalim
2009-11-10 Tidying up encryptors.
369
fdb4cd5b » trevorturk
2010-09-22 Major update to README - encourage use of the Wiki
370 Devise is based on Warden, which is a general Rack authentication framework created by Daniel Neighman. We encourage you to read more about Warden here:
eb3118e8 » josevalim
2010-07-15 Add OAuth2 documentation.
371
13ed2183 » Andrey Korobkov
2011-10-13 many typos (http -> https)
372 https://github.com/hassox/warden
6bd88461 » josevalim
2009-12-23 Update Maintainers and Contributors section. Add Grimen for his work …
373
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
374 ### Contributors
6bd88461 » josevalim
2009-12-23 Update Maintainers and Contributors section. Add Grimen for his work …
375
9bdc7113 » josevalim
2010-05-03 Update README.
376 We have a long list of valued contributors. Check them all at:
377
13ed2183 » Andrey Korobkov
2011-10-13 many typos (http -> https)
378 https://github.com/plataformatec/devise/contributors
6d09eb66 » josevalim
2009-11-10 Tidying up encryptors.
379
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
380 ### Maintainers
5c59f4cd » fortuity
2010-02-27 Fixes to syntax, diction and spelling in README.
381
13ed2183 » Andrey Korobkov
2011-10-13 many typos (http -> https)
382 * José Valim (https://github.com/josevalim)
383 * Carlos Antônio da Silva (https://github.com/carlosantoniodasilva)
b79c6914 » Rodrigo Flores
2011-11-30 Adding myself to the team! w00t!
384 * Rodrigo Flores (https://github.com/rodrigoflores)
5c59f4cd » fortuity
2010-02-27 Fixes to syntax, diction and spelling in README.
385
bb6d89bb » carlosantoniodasilva
2012-01-30 Change README do markdown
386 ## License
5c59f4cd » fortuity
2010-02-27 Fixes to syntax, diction and spelling in README.
387
95399f12 » carlosantoniodasilva
2012-01-24 2012 [ci skip]
388 MIT License. Copyright 2012 Plataforma Tecnologia. http://blog.plataformatec.com.br
Something went wrong with that request. Please try again.