Class: Locomotive::EmptyInput
- Inherits:
-
Object
- Object
- Locomotive::EmptyInput
- Includes:
- Formtastic::Inputs::Base
- Defined in:
- app/inputs/locomotive/empty_input.rb
Instance Method Summary collapse
- #association_primary_key ⇒ Object
- #error_html ⇒ Object
- #errors? ⇒ Boolean
- #to_html ⇒ Object
- #wrapper_html_options ⇒ Object
Instance Method Details
#association_primary_key ⇒ Object
12 13 14 15 16 17 18 |
# File 'app/inputs/locomotive/empty_input.rb', line 12 def association_primary_key begin super rescue Exception => e # does not work correctly with embedded collections end end |
#error_html ⇒ Object
26 27 28 |
# File 'app/inputs/locomotive/empty_input.rb', line 26 def error_html "" end |
#errors? ⇒ Boolean
30 31 32 |
# File 'app/inputs/locomotive/empty_input.rb', line 30 def errors? false end |
#to_html ⇒ Object
5 6 7 8 9 10 |
# File 'app/inputs/locomotive/empty_input.rb', line 5 def to_html input_wrapping do label_html # render nothing end end |
#wrapper_html_options ⇒ Object
20 21 22 23 24 |
# File 'app/inputs/locomotive/empty_input.rb', line 20 def super.tap do |opts| opts[:class] += ' no-label' unless render_label? end end |