README.md in petergate-1.5.5 vs README.md in petergate-1.6.2
- old
+ new
@@ -10,23 +10,23 @@
>
> -- <cite>1 Peter 3:41</cite>
Installation
------
+#####Get the gem
+Add this line to your application's Gemfile:
-######Add this line to your application's Gemfile:
-
gem 'petergate'
-######And then execute:
+And then execute:
bundle
-######Or install it yourself as:
+Or install it yourself as:
gem install petergate
-######Setup Authentication
+#####Prerequisites: Setup Authentication (Devise)
Make sure your user model is defined in
app/models/user.rb
and called User.
@@ -35,11 +35,11 @@
user_signed_in?
current_user
after_sign_in_path_for(current_user)
authenticate_user!
-######Finally you can run the generators
+#####Run the generators
rails g petergate:install
rake db:migrate
This will add a migration and insert petergate into your User model.
@@ -91,9 +91,14 @@
def roles=(v)
self[:roles] = v.map(&:to_sym).to_a.select{|r| r.size > 0 && ROLES.include?(r)}
end
```
+If you want to change the `permission denied` message you can add to the access line:
+
+```ruby
+access user: [:show, :index], message: "You shall not pass"
+```
Credits
-------
PeterGate is written and maintaned by Isaac Sloan and friends.