Class: StaticInput

Inherits:
SimpleForm::Inputs::Base
  • Object
show all
Defined in:
lib/stationed/generators/templates/static_input.rb

Overview

Special kind of input field that shows the editable value as plain text, not with a form widget. Handy when you want to indicate the field is not editable.

Examples:

f.input :my_attribute, as: :static

Instance Method Summary collapse

Instance Method Details

#inputObject



8
9
10
# File 'lib/stationed/generators/templates/static_input.rb', line 8

def input
   :span, object.send(attribute_name), class: 'static-field'
end