Module: BulmaFormRails::FormPageHelpers
- Defined in:
- lib/bulma_form_rails/form_page_helpers.rb
Overview
This Ruby on Rails Helper module allows easy and efficient web form page rendering.
Instance Method Summary collapse
-
#bulma_edit_form_page(name, model, models_path, model_path) ⇒ Object
Render a standard model edit form page.
-
#bulma_new_form_page(name, model, models_path) ⇒ Object
Render a standard model creation form page.
Instance Method Details
#bulma_edit_form_page(name, model, models_path, model_path) ⇒ Object
Render a standard model edit form page.
-
name
- a symbol representing the model name -
model
- the model object -
models_path
- the controller URL path for the action that renders the model collection -
model_path
- the controller URL path for the action that renders this individual model
25 26 27 |
# File 'lib/bulma_form_rails/form_page_helpers.rb', line 25 def bulma_edit_form_page(name, model, models_path, model_path) render partial: 'bulma_form_rails/edit_form_page', locals: {name: name, model: model, models_path: models_path, model_path: model_path} end |
#bulma_new_form_page(name, model, models_path) ⇒ Object
Render a standard model creation form page.
-
name
- a symbol representing the model name -
model
- the model object -
models_path
- the controller URL path for the action that renders the model collection
16 17 18 |
# File 'lib/bulma_form_rails/form_page_helpers.rb', line 16 def bulma_new_form_page(name, model, models_path) render partial: 'bulma_form_rails/new_form_page', locals: {name: name, model: model, models_path: models_path} end |