1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

README with some Generators info.

This commit is contained in:
Carlos A. da Silva 2009-10-23 11:18:11 -02:00
parent d4f2c2a5ed
commit 0a317c964a

View file

@ -46,6 +46,8 @@ And you're ready to go.
Devise must be setted up within the model (or models) you want to use, and devise routes must be created inside your routes.rb file.
This is a walkthrough with all steps you need to setup a devise resource, including model, migration, route files, and optional configuration. You can also check out the *Generatos* section below to help you start.
We're assuming here you want a User model. First of all you have to setup a migration with the following fields:
create_table :users do
@ -191,6 +193,20 @@ Devise let's you setup as many roles as you want, so let's say you already have
current_admin
admin_session
== Generators
Devise comes with some generators to help you start:
script/generate devise Model
Will generate a model, configured with all devise modules, and add attr_accessible for default fields, so you can setup more accessible attributes later. The generator will also create the migration and configure your route for devise.
You can also copy devise views to your application, being able to modify them based on your needs. To do it so, run the following command:
script/generate devise_views
This is gonna copy all session, password, confirmation and notifier views to your app/views folder.
== I18n
Devise check for flash messages using i18n, so you're able to customize them easily. For example, to change the sign in message you should setup your locale file this way: