authority 2.4.0 → 2.4.1
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.markdown +4 -0
- data/README.markdown +1 -1
- data/lib/authority/controller.rb +2 -1
- data/lib/authority/version.rb +1 -1
- metadata +4 -4
data/CHANGELOG.markdown
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
Authority does its best to use [semantic versioning](http://semver.org).
|
4
4
|
|
5
|
+
## v2.4.1
|
6
|
+
|
7
|
+
The controller method name given to `authorize_actions_for` no longer has to be public. (We don't want to force controllers to make any method public that shouldn't be a routable action.)
|
8
|
+
|
5
9
|
## v2.4.0
|
6
10
|
|
7
11
|
Controller method `authorize_actions_for` can now be given a method name to dynamically determine the class to authorize. For example, `authorize_actions_for :model_class` will call the `model_class` method on the controller instance at request time.
|
data/README.markdown
CHANGED
data/lib/authority/controller.rb
CHANGED
@@ -96,7 +96,8 @@ module Authority
|
|
96
96
|
|
97
97
|
def authority_resource
|
98
98
|
return self.class.authority_resource if self.class.authority_resource.is_a?(Class)
|
99
|
-
|
99
|
+
send(self.class.authority_resource)
|
100
|
+
rescue NoMethodError => e
|
100
101
|
raise MissingResource.new(
|
101
102
|
"Trying to authorize actions for '#{self.class.authority_resource}', but can't. \
|
102
103
|
Must be either a resource class OR the name of a controller instance method that \
|
data/lib/authority/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authority
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.4.
|
4
|
+
version: 2.4.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-02-
|
13
|
+
date: 2013-02-14 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -89,7 +89,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
89
89
|
version: '0'
|
90
90
|
segments:
|
91
91
|
- 0
|
92
|
-
hash:
|
92
|
+
hash: 1265936513199133765
|
93
93
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
98
98
|
version: '0'
|
99
99
|
segments:
|
100
100
|
- 0
|
101
|
-
hash:
|
101
|
+
hash: 1265936513199133765
|
102
102
|
requirements: []
|
103
103
|
rubyforge_project:
|
104
104
|
rubygems_version: 1.8.24
|