Sha256: d7503f1eead0f3fb784571817c132d9a6b7563e4be8e1d0b2b83df3f4538dd63

Contents?: true

Size: 1.3 KB

Versions: 1

Compression:

Stored size: 1.3 KB

Contents

require 'rexml/document'

module BulmaFormRails

  # rdoc-image:https://github.com/modgeosys/bulma_form_rails/blob/371b651b4cf38336f85378467f15b98b5367049e/doc/images/modgeosys_logo.jpg?raw=true
  # 
  # https://kevinweller.name
  # 
  # This Ruby on Rails Helper module allows easy and efficient web form page rendering.
  module FormPageHelpers
    
    # 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
    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
  
    # 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
    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

  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bulma_form_rails-1.0.4 lib/bulma_form_rails/form_page_helpers.rb