Module: BootboxCrud::ActionView::Helpers
- Defined in:
- lib/bootbox_crud/action_view/helpers.rb
Instance Method Summary collapse
- #bb_alert ⇒ Object
- #form_options ⇒ Object
- #remote_form_options ⇒ Object
- #show_link_to(label, object, link_text) ⇒ Object
- #show_link_to_array(label, objects, name_object_field) ⇒ Object
- #show_value(label, value) ⇒ Object
Instance Method Details
#bb_alert ⇒ Object
16 17 18 |
# File 'lib/bootbox_crud/action_view/helpers.rb', line 16 def bb_alert render :partial => 'layouts/bb_alert' end |
#form_options ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/bootbox_crud/action_view/helpers.rb', line 20 def { html: { class: 'form-horizontal' }, wrapper: :horizontal_form, wrapper_mappings: { check_boxes: :horizontal_radio_and_checkboxes, radio_buttons: :horizontal_radio_and_checkboxes, file: :horizontal_file_input, boolean: :horizontal_boolean } } end |
#remote_form_options ⇒ Object
32 33 34 |
# File 'lib/bootbox_crud/action_view/helpers.rb', line 32 def { remote: true, authenticity_token: true }.merge() end |
#show_link_to(label, object, link_text) ⇒ Object
8 9 10 |
# File 'lib/bootbox_crud/action_view/helpers.rb', line 8 def show_link_to(label, object, link_text) render :partial => 'layouts/show_link_to', :locals => { :label => label, :link_to_text => link_text, :link_to_object => object } end |
#show_link_to_array(label, objects, name_object_field) ⇒ Object
12 13 14 |
# File 'lib/bootbox_crud/action_view/helpers.rb', line 12 def show_link_to_array(label, objects, name_object_field) render :partial => 'layouts/show_link_to_array', :locals => { :label => label, :objects => objects, :field => name_object_field } end |
#show_value(label, value) ⇒ Object
4 5 6 |
# File 'lib/bootbox_crud/action_view/helpers.rb', line 4 def show_value(label, value) render :partial => 'layouts/show_value', :locals => { :label => label, :value => value } end |