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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f9a9182e701015c6a9d10c66a2e0a6d5d2535d1a
4
- data.tar.gz: 2b1203da16f841429eb56d165b61ba5de04aded3
3
+ metadata.gz: bc6e987158f607191888c0343660d613a471ebc7
4
+ data.tar.gz: 5cf9019701f15fe921dd7aa34bbc3266e804872b
5
5
  SHA512:
6
- metadata.gz: 483a8b9a7d281c555924207e2423fe8a6aecf550c31311030e42f42c871e4eff1662b196c743dbe736db7234da88a8e268d3748592b800573729e1ba14530669
7
- data.tar.gz: 3dcee5d48dbc3c89c331caccc6e4e1a8ae7738d949c717d1a46f433e70013132ae911f28e3839f2d1ed81969864794c89f039d36c37d949344315ac5b7d88edb
6
+ metadata.gz: 3d73bc964d0070b7dffecabd72653582ee2d504968f181c2ef9f6ea9a7c5d36cb2f40434bf93f6f3de3dde3c6aaada0508f5e407576df62b9a60bfdced6cd4f2
7
+ data.tar.gz: dbc6b4df83f83cb30ff32f7d1773f83c15d0cde5ef2ae8c2853313ea36aff9452cc0fbb140346802547e3faf7bc5bcdb69c2823f9b24140140fce76981265d7c
@@ -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
 
@@ -1,3 +1,3 @@
1
1
  module CanCanRight
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cancanright
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Grant Colegate