inline_forms 3.1.5 → 3.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/app/helpers/form_elements/dropdown_with_values.rb +12 -1
- data/lib/inline_forms/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NDZhNjFmNThiY2ExM2Q1MzQ0NWMzNDE4Mjk2ODM4MzY0NWMyYTBiYw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NWZiMmI4ZTBiOTVkZTY3NWE3NGViNDdiZTU5NTAxMGZjOGYxNTNkOA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OWVkYWQzMmYyZWIzNTdlY2VjNjExMzMyMDQ5OWFhNzM5YWI4MGNmYjliYzEx
|
10
|
+
OWQ3NWM2NzA0YmIzODFhMDkwODY4YjViNWY3ZDM5MWYxMWZkNTM1NDBkMTNl
|
11
|
+
ZDRmNzM5ZGY3ZTU1NTUyZTc3Nzc5OGI4NmNjMWM2Y2QwZDU2ZTE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OWRhYTk4OTllMTgwOTM2ZDMyNTg4ZDM4ZmJhMzZjMWI5N2JlZjg3NGI4MDgz
|
14
|
+
MTI4Y2YwYjQ2ZWQwYzcyNTQ0ZDRkZjY2NDA3NDI5MWFiNTZmM2Q1MjA2MjRh
|
15
|
+
NWQyNTliNmI0YTI5OWQwYjQxYjk2OTY3NjNlNWVlOGJlZWZmMWE=
|
@@ -6,11 +6,22 @@ def dropdown_with_values_show(object, attribute)
|
|
6
6
|
values = attribute_values(object, attribute)
|
7
7
|
link_to_inline_edit object, attribute, object.send(attribute) ? t(values.assoc(object.send(attribute))[1]) : "<i class='fi-plus'></i>".html_safe
|
8
8
|
end
|
9
|
+
|
9
10
|
def dropdown_with_values_edit(object, attribute)
|
10
11
|
# the leading underscore is to avoid name conflicts, like 'email' and 'email_type' will result in 'email' and 'email[email_type_id]' in the form!
|
11
12
|
values = attribute_values(object, attribute)
|
12
|
-
|
13
|
+
|
14
|
+
attributes = @inline_forms_attribute_list || object.inline_forms_attribute_list
|
15
|
+
options_disabled = attributes.assoc(attribute.to_sym)[4]
|
16
|
+
|
17
|
+
collection_select( ('_' + object.class.to_s.underscore).to_sym,
|
18
|
+
attribute.to_sym,
|
19
|
+
values, 'first', 'last',
|
20
|
+
:selected => object.send(attribute),
|
21
|
+
disabled: options_disabled,
|
22
|
+
)
|
13
23
|
end
|
24
|
+
|
14
25
|
def dropdown_with_values_update(object, attribute)
|
15
26
|
object[attribute.to_sym] = params[('_' + object.class.to_s.underscore).to_sym][attribute.to_sym]
|
16
27
|
end
|
data/lib/inline_forms/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inline_forms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ace Suares
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rvm
|