serbea 0.11.1 → 0.11.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/serbea/rails_support.rb +2 -1
- data/lib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 11c2a260e37cfdb74aafdaebaac141b8b6ba8b5aea0d563456eb2a9dfacc0f67
|
4
|
+
data.tar.gz: 0f57a10d64a9175fd7e5a343c53b619d15f4ac11a9454e2378e6f4ecfe3c7b7f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70270db753f5b0074ef1c29c0f8e7c1432732a2727bd52a009438e12dbe2b4b0b1d2149461083dfd55c6563b850f152d16cf6d921e90a5c6d474d17ffe7692fc
|
7
|
+
data.tar.gz: a17429ee53917bada380a0f544c039304b29b7d7f56725e62c2a22aa5f31b8a4c9a576da6fcaaea0a13c1b7830d9243292e93057771b020850fa3384958aca8f
|
data/lib/serbea/rails_support.rb
CHANGED
@@ -42,9 +42,10 @@ end
|
|
42
42
|
Serbea::TemplateEngine.directive :form, ->(code, buffer) do
|
43
43
|
model_name, space, params = code.lstrip.partition(%r(\s)m)
|
44
44
|
model_name.chomp!(",")
|
45
|
+
model_name = "#{model_name}," unless params.lstrip.start_with?("do", "{")
|
45
46
|
|
46
47
|
buffer << "{%= form_with model: "
|
47
|
-
buffer << model_name << "
|
48
|
+
buffer << model_name << " #{params}"
|
48
49
|
buffer << " %}"
|
49
50
|
end
|
50
51
|
|
data/lib/version.rb
CHANGED