petergate 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -0
- data/lib/petergate/version.rb +1 -1
- data/lib/templates/rails/scaffold_controller/controller.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de06a08ec4ff4aef5960901b33c6ce1c5f62cc37
|
4
|
+
data.tar.gz: 5fc28c5ba7fd611458d8071ea2b7b30a9f80aa61
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ea77c11bb3d86744de4b05fad7179e1cac58e1f26befbb2d8083bcec67aa73c924270c64a90cc87a7cb07cc45d891e48b0ef58710b0c2676e60b22461036fb8
|
7
|
+
data.tar.gz: 09f2720549ba5c40e27deaf18e585e7cdfcfa50bebff6930dd87df9b17ed7ca5e6aa411f96490a1e6eb4b050b6bb7bb194af85ec6fc95c6796d17dea8e657590
|
data/README.md
CHANGED
@@ -54,6 +54,9 @@ Setup permissions in your controllers the same as you would for a before filter
|
|
54
54
|
|
55
55
|
```ruby
|
56
56
|
access all: [:show, :index], user: ALLREST
|
57
|
+
|
58
|
+
# one other options that might seem a bit weird is to put a group of roles in an array:
|
59
|
+
access [:all, :user] => [:show, :index]
|
57
60
|
```
|
58
61
|
|
59
62
|
Inside your views you can use logged_in?(:admin, :customer, :etc) to show or hide content.
|
data/lib/petergate/version.rb
CHANGED
@@ -5,7 +5,7 @@ require_dependency "<%= namespaced_file_path %>/application_controller"
|
|
5
5
|
<% module_namespacing do -%>
|
6
6
|
class <%= controller_class_name %>Controller < ApplicationController
|
7
7
|
before_action :set_<%= singular_table_name %>, only: [:show, :edit, :update, :destroy]
|
8
|
-
access
|
8
|
+
access all: [:index, :show, :new, :edit, :create, :update, :destroy]
|
9
9
|
|
10
10
|
# GET <%= route_url %>
|
11
11
|
def index
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: petergate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Isaac Sloan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
94
|
version: '0'
|
95
95
|
requirements: []
|
96
96
|
rubyforge_project:
|
97
|
-
rubygems_version: 2.
|
97
|
+
rubygems_version: 2.4.5
|
98
98
|
signing_key:
|
99
99
|
specification_version: 4
|
100
100
|
summary: Authorization system allowing verbose easy read controller syntax.
|