cancancan 3.6.0 → 3.6.1

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
  SHA256:
3
- metadata.gz: ec627804781c87a834f313dfd9447e83d8769449dab9a484f7069cb201a7450a
4
- data.tar.gz: d6e99d78e6f075d1870f02c491090d3526e1167770ed886fbd00c1933be78f2d
3
+ metadata.gz: e0d4a5b11aba155764cf54465d5d8bf88872fed61f4a33736d45a531c619ad6e
4
+ data.tar.gz: 12b3b41403f3fdaba3fdb97c30ce17e319d1bfdef05fcb7700d41ba754c75a55
5
5
  SHA512:
6
- metadata.gz: 98a14c9573781aad22fe329853e516e9149d977b4f02ee0f274a79651bd29ec6444b15397cff695f2ec8ac94a0a0207b060c11dbe20ab0d65471a18023b0b4e1
7
- data.tar.gz: 8e6ac6e2b51fb9ca95c7f59d961d1da0a35d9fa3bae5e8b0fa967c9a2f4c18e44577b8048fa33612919eb03bb010335ccd57c9cffb0497175a906bfc66e4c212
6
+ metadata.gz: beb6989dbb2554678fa17626b6138aab396419b6d01ed8ce3ee3781030086da48985837a01bef50ab111fb47273454df8c7e3d6ced11b10a036ffe2e494feb15
7
+ data.tar.gz: 405b0e6eb4ab73f04964651ab27e106701c014cd706f74012e5f30aada5796de6541f812593b57e058031af0991890884701136229f0405900e3bc99ce3747ee
@@ -31,7 +31,7 @@ module CanCan
31
31
  klass = subject_class?(subject) ? subject : subject.class
32
32
  # empty attributes is an 'all'
33
33
  if rule.attributes.empty? && klass < ActiveRecord::Base
34
- klass.column_names.map(&:to_sym) - Array(klass.primary_key)
34
+ klass.attribute_names.map(&:to_sym) - Array(klass.primary_key)
35
35
  else
36
36
  rule.attributes
37
37
  end
@@ -171,6 +171,11 @@ module CanCan
171
171
  # [:+instance_name+]
172
172
  # The name of the instance variable for this resource.
173
173
  #
174
+ # [:+id_param+]
175
+ # Find using a param key other than :id. For example:
176
+ #
177
+ # load_resource :id_param => :url # will use find(params[:url])
178
+ #
174
179
  # [:+through+]
175
180
  # Authorize conditions on this parent resource when instance isn't available.
176
181
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module CanCan
4
- VERSION = '3.6.0'.freeze
4
+ VERSION = '3.6.1'.freeze
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cancancan
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.0
4
+ version: 3.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Rodi (Renuo AG)
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2024-05-23 00:00:00.000000000 Z
14
+ date: 2024-05-28 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: appraisal