effective_bootstrap 0.0.25 → 0.0.26
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: b736a331a5814c69fca221f9e5504e3cc53a203f
|
4
|
+
data.tar.gz: 089604a439cd7491e5d3892fcb1dfaa7d46a12e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9ee8121c6b9ee503fbe672b73dc8a647a742d02eb6c789c7f29cc0ddae9892611c33f3493e0e7697d600cd83505f62084d751dc27d90e4e9fd68a3ff508b7c3
|
7
|
+
data.tar.gz: b8ed30c89d8c3a889e6f142c009ca422c3ba492a23a39e7d2e48f5a7635ce87551b3cdf871302ff10dc277f4600acfbfc4edb72a61fff19c13d0da772ecff87a
|
@@ -5,15 +5,14 @@ module EffectiveFormBuilderHelper
|
|
5
5
|
|
6
6
|
# Compute the default ID
|
7
7
|
subject = Array(options[:scope] || options[:model]).last
|
8
|
+
class_name = subject.class.name.parameterize.underscore
|
8
9
|
|
9
10
|
html_id = if subject.kind_of?(Symbol)
|
10
|
-
subject
|
11
|
-
elsif subject.respond_to?(:new_record?) && subject.new_record?
|
12
|
-
"new_#{subject.class.name.underscore}"
|
11
|
+
subject.to_s
|
13
12
|
elsif subject.respond_to?(:persisted?) && subject.persisted?
|
14
|
-
"edit_#{
|
13
|
+
"edit_#{class_name}_#{subject.to_param}"
|
15
14
|
else
|
16
|
-
|
15
|
+
"new_#{class_name}"
|
17
16
|
end
|
18
17
|
|
19
18
|
remote_index = options.except(:model).hash.abs
|