Class: ActiveAdmin::Views::FormtasticProxy
- Inherits:
-
Arbo::Rails::Forms::FormBuilderProxy
- Object
- Arbo::Rails::Forms::FormBuilderProxy
- ActiveAdmin::Views::FormtasticProxy
show all
- Defined in:
- lib/active_admin/views/components/active_admin_form.rb
Instance Method Summary
collapse
Instance Method Details
#closing_tag ⇒ Object
14
15
16
|
# File 'lib/active_admin/views/components/active_admin_form.rb', line 14
def closing_tag
@closing_tag || ""
end
|
#opening_tag ⇒ Object
10
11
12
|
# File 'lib/active_admin/views/components/active_admin_form.rb', line 10
def opening_tag
@opening_tag || ""
end
|
#render_in(context = arbo_context) ⇒ Object
18
19
20
21
22
23
24
|
# File 'lib/active_admin/views/components/active_admin_form.rb', line 18
def render_in(context = arbo_context)
pos = context.output_buffer.length
context.output_buffer << opening_tag.html_safe
children.map { |element| element.render_in(context) }
context.output_buffer << closing_tag.html_safe
pos > 0 ? context.output_buffer.to_str[pos..] : context.output_buffer
end
|
#split_string_on(string, match) ⇒ Object
4
5
6
7
8
|
# File 'lib/active_admin/views/components/active_admin_form.rb', line 4
def split_string_on(string, match)
return "" unless string && match
part_1 = string.split(Regexp.new("#{match}\\z")).first
[part_1, match]
end
|
#to_s ⇒ Object
26
27
28
|
# File 'lib/active_admin/views/components/active_admin_form.rb', line 26
def to_s
opening_tag + children.to_s + closing_tag
end
|