simple_form_extension 1.2.20 → 1.2.21
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e370539cbb41a3fadee1616fab1de6f18e4e72c1
|
4
|
+
data.tar.gz: a3e2e7f10511fd4bd99779e256f4f281365be79d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35be6562973b9c43412da2b3459b8b7e286f75919a313d55f5500ff56c4e241cd153197463e85510cd5daaa5435f3c2c9a107554a0b32993e9bbd3b894b4ab5a
|
7
|
+
data.tar.gz: 0669e178bcd964fbfeee69bec192eddc1b2a35e0e5f9717e01477ab0fbc1ad60160ecc6a4569c77a165da747a435d038d17411f7de01ee5b3681e6820f677d47
|
@@ -114,10 +114,10 @@ module SimpleFormExtension
|
|
114
114
|
end
|
115
115
|
|
116
116
|
def foreign_key
|
117
|
-
@foreign_key ||=
|
118
|
-
|
119
|
-
|
120
|
-
|
117
|
+
@foreign_key ||= case reflection.macro
|
118
|
+
when :belongs_to then reflection.foreign_key
|
119
|
+
when :has_one then :"#{ reflection.name }_id"
|
120
|
+
when :has_many then :"#{ reflection.name.to_s.singularize }_ids"
|
121
121
|
end
|
122
122
|
end
|
123
123
|
end
|
@@ -1,5 +1,4 @@
|
|
1
1
|
class Selectize
|
2
|
-
|
3
2
|
selectizeDefaults: ->
|
4
3
|
mode: if @single then 'single' else 'multi'
|
5
4
|
maxItems: if @single then 1 else @$el.data('max-items')
|
@@ -15,9 +14,7 @@ class Selectize
|
|
15
14
|
|
16
15
|
@$el.val('')
|
17
16
|
|
18
|
-
@$el.selectize(
|
19
|
-
$.extend @selectizeDefaults(), @options
|
20
|
-
)
|
17
|
+
@$el.selectize($.extend @selectizeDefaults(), @options)
|
21
18
|
|
22
19
|
if (value = @$el.data('value'))
|
23
20
|
@initializeValue(value)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: simple_form_extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexandre Vasseur
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|