Skip to content

Commit 24f7b5d

Browse files
committed
Allow for locals
This should allow for locals to be passed into the erector.
1 parent 12b1fb9 commit 24f7b5d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/formbuilder/views/form.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ class Form < Erector::Widget
99
action: '',
1010
method: 'POST',
1111
extradata: {}
12+
13+
def initialize
14+
@form = form unless form.nil?
15+
@entry = entry unless entry.nil?
16+
end
1217

1318
def content
1419
page_list if @form.multi_page?
@@ -86,4 +91,4 @@ def last_page?
8691

8792
end
8893
end
89-
end
94+
end

0 commit comments

Comments
 (0)