Class: SimpleForm::Inputs::BlockInput

Inherits:
Base
  • Object
show all
Defined in:
lib/simple_form/inputs/block_input.rb

Constant Summary

Constants inherited from Base

SimpleForm::Inputs::Base::ACTIONS

Instance Attribute Summary

Attributes inherited from Base

#attribute_name, #column, #input_html_options, #input_type, #options, #reflection

Instance Method Summary collapse

Methods inherited from Base

#input_html_classes, #input_options, #render

Methods included from SimpleForm::I18nCache

#get_i18n_cache, #i18n_cache, #reset_i18n_cache

Methods included from Components::Wrapper

#wrap, #wrapper_class, #wrapper_error_class, #wrapper_html_options, #wrapper_tag

Methods included from Components::Placeholders

#has_placeholder?, #placeholder, #placeholder_present?, #placeholder_text

Methods included from Components::LabelInput

included, #label_input

Methods included from Components::Hints

#hint, #hint_html_options, #hint_tag, #hint_text

Methods included from Components::Errors

#error, #error_html_options, #error_method, #error_tag, #error_text

Constructor Details

#initialize(*args, &block) ⇒ BlockInput

Returns a new instance of BlockInput.



4
5
6
7
# File 'lib/simple_form/inputs/block_input.rb', line 4

def initialize(*args, &block)
  super
  @block = block
end

Instance Method Details

#inputObject



9
10
11
# File 'lib/simple_form/inputs/block_input.rb', line 9

def input
  template.capture(&@block)
end