Skip to content

Latest commit

 

History

History
31 lines (19 loc) · 877 Bytes

File metadata and controls

31 lines (19 loc) · 877 Bytes

question

Solutions

See Pull Requests diffs and it's branches to view solution.

Setup

bundle install
rake db:create db:migrate db:seed 
rails server

Test

rspec

Documentation

rake db:seed will create 3 users with different roles:

  • reader@mail.com with password 123123123 - can read everybodie's post. Cannot create or delete any.
  • writer@mail.com with password 123123123 - can create/update/delete own posts. Cannot read/update/delete foreign.
  • admin@mail.com with password 123123123 - can do everything.

See spec/controllers/posts_controller_spec.rb test for details