plutonium 0.13.0 → 0.13.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: 222b8e93e567c8dd01dccdd752b3a955be3cd749fb18b3e88904e33a5f186aec
4
- data.tar.gz: 95e6a0854141f364c7a5627232a06af14cbaf433cbf8728fdaf599ddf033d507
3
+ metadata.gz: 5613f3f21b909b90355d61dd75e5fe19554451e742bc65484dce87fcd99d3c55
4
+ data.tar.gz: 37b0fe5f8d09973f410b386e9648de5d55b6a37b1291a8dc80d83221b3126504
5
5
  SHA512:
6
- metadata.gz: ad05d35f79f12361cca5f536b8ab0a23774b3eb912a62f3d4efc345b9ef2ddbea059f7e217c1144937e6ddca1179000844215d4bfe4b501aa806928ce962e580
7
- data.tar.gz: f557dcfbaad1eb038c62804afad5225c93cef05f09879eceeddebad350ab01641f4ef2d3f54072985ae9c1bb3de55005cea8ed01dfbaea1f5fbd0f045c2b1720
6
+ metadata.gz: 455e471891a69946523afa54b1ce81bf7032add875887094225bd25ddfd884cf71fe8c2cf198ce7ef88d842b2edf7277b3baec36f73b11d45c9a2c62d020fef3
7
+ data.tar.gz: ba54e184b43db4094905938420a6573057a27b217ec376722fa5be97c403f7e3096828f0532e23da014f81e0e484c11bd3cd6807086291df89ce8c2c663d4c6b
@@ -65,7 +65,7 @@ module Plutonium
65
65
  url_args = {**kwargs, action: action}.compact
66
66
 
67
67
  controller_chain = [current_package.to_s]
68
- [parent, *args].compact.each_with_index do |element, index|
68
+ [*args].compact.each_with_index do |element, index|
69
69
  if element.is_a?(Class)
70
70
  controller_chain << element.to_s.pluralize
71
71
  else
@@ -80,6 +80,7 @@ module Plutonium
80
80
  end
81
81
  url_args[:controller] = "/#{controller_chain.join("::").underscore}"
82
82
 
83
+ url_args[:"#{parent.model_name.singular_route_key}_id"] = parent.to_param if parent.present?
83
84
  if scoped_to_entity? && scoped_entity_strategy == :path
84
85
  url_args[scoped_entity_param_key] = current_scoped_entity
85
86
  end
@@ -1,3 +1,3 @@
1
1
  module Plutonium
2
- VERSION = "0.13.0"
2
+ VERSION = "0.13.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plutonium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Froelich