See Pull Requests diffs and it's branches to view solution.
bundle install
rake db:create db:migrate db:seed
rails server
rspec
rake db:seed
will create 3 users with different roles:
[email protected]
with password123123123
- can read everybodie's post. Cannot create or delete any.[email protected]
with password123123123
- can create/update/delete own posts. Cannot read/update/delete foreign.[email protected]
with password123123123
- can do everything.
See spec/controllers/posts_controller_spec.rb
test for details