cancanright 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/cancanright/controller_additions.rb +2 -2
- data/lib/cancanright/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc6e987158f607191888c0343660d613a471ebc7
|
4
|
+
data.tar.gz: 5cf9019701f15fe921dd7aa34bbc3266e804872b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3d73bc964d0070b7dffecabd72653582ee2d504968f181c2ef9f6ea9a7c5d36cb2f40434bf93f6f3de3dde3c6aaada0508f5e407576df62b9a60bfdced6cd4f2
|
7
|
+
data.tar.gz: dbc6b4df83f83cb30ff32f7d1773f83c15d0cde5ef2ae8c2853313ea36aff9452cc0fbb140346802547e3faf7bc5bcdb69c2823f9b24140140fce76981265d7c
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,10 @@ All notable changes to this project will be documented in this file.
|
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
4
4
|
This changelog adheres to [Keep a CHANGELOG](http://keepachangelog.com/).
|
5
5
|
|
6
|
+
## [Unreleased]
|
7
|
+
### Fixed
|
8
|
+
- Fix when rights_from is a symbol
|
9
|
+
|
6
10
|
## [0.0.1] - 2016-12-09
|
7
11
|
### Added
|
8
12
|
- Initial release
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module CanCanRight
|
2
2
|
module ControllerAdditions
|
3
3
|
def authorize_action!
|
4
|
-
controller = self.rights_from || params[:controller]
|
5
|
-
action = params[:action]
|
4
|
+
controller = (self.rights_from || params[:controller]).to_s
|
5
|
+
action = params[:action].to_s
|
6
6
|
|
7
7
|
return if can?(:access, controller) || can?(:access, controller + '#' + action)
|
8
8
|
|
data/lib/cancanright/version.rb
CHANGED