actionset 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +2 -0
- data/lib/action_set/helpers/params/form_for_object_helper.rb +4 -3
- data/lib/action_set/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ec3fafb97dceebded86c4106ff2515254524d8ad
|
4
|
+
data.tar.gz: 18a2b68db72f4eac5205c58493447c3283db67c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '01828b37ea7c42ec93d8c3961b79b72abdea34b934a096e449436a04613653e9f811b4256336957ac78604f2341fcdc28ee6522217c0a0974e114ab65963d855'
|
7
|
+
data.tar.gz: 5085a765387a6d58d73cdd31504a59d35eb5e4b7e4b4a8b9fd05b307ae6cd1ec5824725855c44ddc56e469a02237e87951e06b123a825ae5e784ba8d1d790b26
|
data/CHANGELOG
CHANGED
@@ -5,11 +5,12 @@ require 'ostruct'
|
|
5
5
|
|
6
6
|
module Params
|
7
7
|
module FormForObjectHelper
|
8
|
-
def form_for_object_from_param(param)
|
9
|
-
form_for_params =
|
8
|
+
def form_for_object_from_param(param, defaults = {})
|
9
|
+
form_for_params = current_params.fetch(param, {})
|
10
10
|
form_for_requirements = { model_name: { param_key: param } }
|
11
|
+
form_for_hash = defaults.merge(form_for_params).merge(form_for_requirements)
|
11
12
|
|
12
|
-
JSON.parse(
|
13
|
+
JSON.parse(form_for_hash.to_json,
|
13
14
|
object_class: OpenStruct)
|
14
15
|
end
|
15
16
|
end
|
data/lib/action_set/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actionset
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Margheim
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activeset
|