Just to become a nice and easy start up app within a few seconds.
- rails_admin
- devise
- cancan
- papertrail
First I added the necessary gems to the Gemfile:
As I was using openshift, I had to get rid of the pg (not used, I'm using mysql || sqlite3).
Then:
rails g rails_admin:install
(mounting admin as /admin, the default option)
Then for devise:
rails generate devise:install rails g devise:views rails g devise User
For CanCan:
rails g cancan:ability
And for PaperTrail:
rails generate paper_trail:install --with-changes --with-associations
After that, only last to add the ":username" to the User model
rails g migration AddUsernameToUser username:string
Then the usual
bundle exec rake db:migrate
And for the groups, if needed:
rails g model Role name:string rails g migration addRoleIdToUser role:references rake db:migrate
And the base is quite OK
No hay comentarios.:
Publicar un comentario