kablam 0.3.6 → 0.3.7
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b338c47800ce82600d8559c6bc669b20a63d197f950fe0a4b6b15800d2d4ddbe
|
4
|
+
data.tar.gz: '09e87e1aad2e3f350aca2f96735f1f22d52acb878340b03299a7905f3e847f27'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56ad6fe5c806be4ccc6815474d63fb541e3447e7557baf8124487137e3c1e78d49fce7cf1e53a0af85d39c71913ac572d6b8fd701216d14951ef5377ba03b831
|
7
|
+
data.tar.gz: 2d31c6164b666c7b2a937d8dcdb96c4bceafac494c7e60aad323168df3158d622858d7fffc907c55ca1fd467482f1fa872938f335fc7cd4620cec540c6de1df5
|
@@ -4,9 +4,9 @@ var newMessage = HTMLElement.From(content);
|
|
4
4
|
var target = document
|
5
5
|
.getElementById('<%= params[:target] || "target_index" %>')
|
6
6
|
|
7
|
-
<% if Kablam.render_item["#{@object.
|
7
|
+
<% if Kablam.render_item["#{@object.model_name.singular}"] == "top" %>
|
8
8
|
target.innerHTML = newMessage.outerHTML + target.innerHTML;
|
9
|
-
<% elsif Kablam.render_item["#{@object.
|
9
|
+
<% elsif Kablam.render_item["#{@object.model_name.singular}"] == "bottom" %>
|
10
10
|
target.innerHTML = target.innerHTML + newMessage.outerHTML;
|
11
11
|
<% end %>
|
12
12
|
|
@@ -30,6 +30,9 @@
|
|
30
30
|
<%= (render "kablam_forms/fields/pretext", classes: classes, input: input) if input[:pretext].present? %>
|
31
31
|
<%= render "kablam_forms/fields/#{classyy.to_s}", classes: classes, input: input, f: f, opt: opt %>
|
32
32
|
<% end %>
|
33
|
+
<div>
|
34
|
+
<%= yield(f) %>
|
35
|
+
</div>
|
33
36
|
<%= f.submit(
|
34
37
|
data: { disable_with: 'Submitting' },
|
35
38
|
class: classes[:submit_button]) %>
|
@@ -10,9 +10,7 @@
|
|
10
10
|
redirect = redirect || nil
|
11
11
|
scrolltop = scrolltop || false
|
12
12
|
%>
|
13
|
-
|
14
|
-
<%=
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
<%= render "kablam_forms/form_generator", classes: classes, obj: obj, target: target, hidden: hidden, ajax_remove: ajax_remove, redirect: redirect, scrolltop: scrolltop do |f| %>
|
14
|
+
<%= yield(f) %>
|
15
|
+
<% end %>
|
18
16
|
|
data/kablam.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'kablam'
|
3
|
-
s.version = '0.3.
|
3
|
+
s.version = '0.3.7'
|
4
4
|
s.date = Time.now.strftime("%Y-%m-%d")
|
5
5
|
s.summary = "Kablam! All the things you hate. But Faster."
|
6
6
|
s.description = "Gem to make development of everything in rails faster. Form creation & styling, all the resource routes, even actioncable messaging!\n {NOTE: In Development. NOT READY FOR TESTING.}"
|
data/lib/kablam/kablam_helper.rb
CHANGED
@@ -9,6 +9,13 @@ module Kablam
|
|
9
9
|
polymorphic_path("data_undo", params)
|
10
10
|
end
|
11
11
|
|
12
|
+
def kablam_form_for(obj, options = {}, &block)
|
13
|
+
options[:obj] = obj
|
14
|
+
render layout: "kablam_forms/kablam_form", locals: options do
|
15
|
+
capture(&block) if block_given?
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
12
19
|
# TODO: Complete this 🤷
|
13
20
|
def disable_test
|
14
21
|
'console.log("test")'
|