crudable-rails 1.0.0 → 1.1.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c3bce80de66d640b96222a505af0357771fe9657d14ae853649bbdf7c78778bc
4
- data.tar.gz: 435d8c280e42996182578d23065d2905ca39aa6608e324b410eac295933a33aa
3
+ metadata.gz: 4df342f4a146959d7105623ff9e8f1874111a5c4873f8320db55ebd38adf110b
4
+ data.tar.gz: 6ee3eac43181b657e960b993097100095339fe8f087fe2444781fea85112df56
5
5
  SHA512:
6
- metadata.gz: be090adbbbf6dce74144fa5c5ee435fb17f85dc674505ab4244101db8bbdb35cb634a8da2e662f76e83dca14d0b411effbcad0dafa263ca98c1c044e0f1e84f6
7
- data.tar.gz: 1175cca36ec335d808dbe2f7740efd2e9c6043b58b7cf45a7fbe753f0e315b7873a44fbf9ee56256766157468a4b92855a48c44ce8f1c7001bf66959efe3b104
6
+ metadata.gz: 54f5a65182975013cf1a561dd97ca54180220ae98bbf9764c1c805aa64996e48d7e3d0c17f91e65fe8b2f9ee729da94272ac9191ab9afbaed5f0847e2168071b
7
+ data.tar.gz: fe602265e19c2f9cc5186851ea4723f6078021a038d9576ab8775f55d25ea75041f7b740967a223123dac72edc3a82cf510d44ace36e7cf2d3d537ad671dcfba
@@ -104,7 +104,7 @@ module Crudable
104
104
  end
105
105
 
106
106
  def authorizable_scope
107
- defined?(Pundit) ? policy_scope(resource_class) : resource_class.all
107
+ defined?(Pundit) ? policy_scope(resource_namespace + [resource_class]) : resource_class.all
108
108
  end
109
109
 
110
110
  def paginate_resource?
@@ -35,7 +35,7 @@ module Crudable
35
35
  end
36
36
 
37
37
  def authorize_resource(method = action_name)
38
- authorize authorizable_resource, "#{method}?".to_sym
38
+ authorize resource_namespace + [authorizable_resource], "#{method}?".to_sym
39
39
  end
40
40
 
41
41
  def authorizable_resource
@@ -3,6 +3,6 @@
3
3
  # Crudable Version
4
4
  module Crudable
5
5
  module Rails
6
- VERSION = '1.0.0'
6
+ VERSION = '1.1.0'
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crudable-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomislav Simnett