Add gem cancan 1.6.10
rails generate migration addAdminToUsers admin:boolean -s

      invoke  active_record
      create    db/migrate/20140220143431_add_admin_to_users.rb
rake db:migrate

==  AddAdminToUsers: migrating ================================================
-- add_column(:users, :admin, :boolean)
   -> 0.0230s
==  AddAdminToUsers: migrated (0.0230s) =======================================
rails generate scaffold post user:references title:string content:text restricted:boolean -s

      invoke  active_record
      create    db/migrate/20140220144109_create_posts.rb
      create    app/models/post.rb
      invoke    test_unit
      create      test/models/post_test.rb
      create      test/fixtures/posts.yml
      invoke  resource_route
       route    resources :posts
      invoke  scaffold_controller
      create    app/controllers/posts_controller.rb
      invoke    erb
      create      app/views/posts
      create      app/views/posts/index.html.erb
      create      app/views/posts/edit.html.erb
      create      app/views/posts/show.html.erb
      create      app/views/posts/new.html.erb
      create      app/views/posts/_form.html.erb
      invoke    test_unit
      create      test/controllers/posts_controller_test.rb
      invoke    helper
      create      app/helpers/posts_helper.rb
      invoke      test_unit
      create        test/helpers/posts_helper_test.rb
      invoke    jbuilder
      create      app/views/posts/index.json.jbuilder
      create      app/views/posts/show.json.jbuilder
      invoke  assets
      invoke    coffee
      create      app/assets/javascripts/posts.js.coffee
      invoke    scss
      create      app/assets/stylesheets/posts.css.scss
      invoke  scss
      create    app/assets/stylesheets/scaffolds.css.scss
rails generate model collaboration user:references post:references -s

      invoke  active_record
      create    db/migrate/20140220145033_create_collaborations.rb
      create    app/models/collaboration.rb
      invoke    test_unit
      create      test/models/collaboration_test.rb
      create      test/fixtures/collaborations.yml
rake db:migrate

==  CreatePosts: migrating ====================================================
-- create_table(:posts)
   -> 0.0120s
==  CreatePosts: migrated (0.0120s) ===========================================

==  CreateCollaborations: migrating ===========================================
-- create_table(:collaborations)
   -> 0.0050s
==  CreateCollaborations: migrated (0.0060s) ==================================
Add has_many relation between post and collaborations
Seed the database
rails generate cancan:ability -s

      create  app/models/ability.rb
Create can rule for allowing user to delete his/her own posts
Update seed for skipèing confirmation
Add restriction for destroying a post

test http://localhost:3000/posts
Add authorization check for new post and destroy

Test http://localhost:3000/posts/new --> Access denied
Add redirection to 403 page
Finish devise-chp-3-part-1