Class: Inputs::EffectiveStaticControl::Input

Inherits:
Effective::FormInput show all
Defined in:
app/models/inputs/effective_static_control/input.rb

Instance Method Summary collapse

Methods inherited from Effective::FormInput

#default_input_js_options, #field_name, #initialize, #value

Constructor Details

This class inherits a constructor from Effective::FormInput

Instance Method Details

#default_input_classes ⇒ Object



6
7
8
# File 'app/models/inputs/effective_static_control/input.rb', line 6

def default_input_classes
  ['form-control-static']
end

#options ⇒ Object



14
15
16
17
18
19
# File 'app/models/inputs/effective_static_control/input.rb', line 14

def options
  super do |options|
    options[:class].delete('form-control') if options[:class].kind_of?(Array)
    options[:class].delete!('form-control') if options[:class].kind_of?(String)
  end
end

#to_html ⇒ Object



10
11
12
# File 'app/models/inputs/effective_static_control/input.rb', line 10

def to_html
  (:p, value, options)
end