inline_forms 3.1.5 → 3.1.6

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OTMyMjdkYmQ2MGY4OWM1MGJiMTdiNjEzMzA5NTk4MDVkNjZmMGEzMA==
4
+ NDZhNjFmNThiY2ExM2Q1MzQ0NWMzNDE4Mjk2ODM4MzY0NWMyYTBiYw==
5
5
  data.tar.gz: !binary |-
6
- NjcxNjQ3ZWE3OGJmMzJhOWNlY2UwMDhmNGJiNGFlYmFmNGM1YjU3Zg==
6
+ NWZiMmI4ZTBiOTVkZTY3NWE3NGViNDdiZTU5NTAxMGZjOGYxNTNkOA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MDlmODY5ZGVhNzg1ZDIzNjYzOTc0NzAzM2ZjNGFjNjlhMzg3NGJhNWQzOGYy
10
- ZDQwNGJjYjY5MTAwNmEwMGRiYTM2MmJkZTRmYmEzNjQ4NTBmZmUxMzdhNWQy
11
- YjU5MzlhYTU1ZWU1YTVjZTE5OGY4ZDZkOWE5ZTE5OTg4ZTkxYjY=
9
+ OWVkYWQzMmYyZWIzNTdlY2VjNjExMzMyMDQ5OWFhNzM5YWI4MGNmYjliYzEx
10
+ OWQ3NWM2NzA0YmIzODFhMDkwODY4YjViNWY3ZDM5MWYxMWZkNTM1NDBkMTNl
11
+ ZDRmNzM5ZGY3ZTU1NTUyZTc3Nzc5OGI4NmNjMWM2Y2QwZDU2ZTE=
12
12
  data.tar.gz: !binary |-
13
- MDEyYThhM2E5NDdlMTA3N2M2ZmYzODhiYjliODY2MmE2ODg0Y2NjNmFiM2Ew
14
- MDQ5YzYzZWQwMGJjYWZmNDExYzEzODY0ZTJmMDhkNzc2YzcxMTY5OTk5MjE4
15
- N2FkY2E1MTc5ZjA1ZmY3YmQ1N2I1OWE1YzM2M2FlZDEzOTMxMWM=
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
- collection_select( ('_' + object.class.to_s.underscore).to_sym, attribute.to_sym, values, 'first', 'last', :selected => object.send(attribute))
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
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module InlineForms
3
- VERSION = "3.1.5"
3
+ VERSION = "3.1.6"
4
4
  end
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.5
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: 2015-12-04 00:00:00.000000000 Z
11
+ date: 2016-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rvm