Class: BrainDamage::View::Input::Autocompletable
- Inherits:
-
Base
- Object
- Templateable::Base
- Templateable::FieldTemplateable
- Base
- BrainDamage::View::Input::Autocompletable
- Defined in:
- lib/generators/brain_damage/lib/views/inputs/autocompletable.rb
Direct Known Subclasses
AutocompletableMultipleSelection, AutocompletableSimpleSelection
Instance Attribute Summary
Attributes inherited from Templateable::FieldTemplateable
Attributes inherited from Templateable::Base
#inner_html, #options, #template_file
Instance Method Summary collapse
Methods inherited from Base
Methods inherited from Templateable::FieldTemplateable
#empty_haml_path, #initialize, #label_guard?, #method_missing, #render, #show?, #show_label?
Methods inherited from Templateable::Base
#indent, #initialize, #method_missing, #render, #render_erb_file, #render_erb_string, #render_template_file
Constructor Details
This class inherits a constructor from BrainDamage::Templateable::FieldTemplateable
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class BrainDamage::Templateable::FieldTemplateable
Instance Method Details
#display_method ⇒ Object
16 17 18 |
# File 'lib/generators/brain_damage/lib/views/inputs/autocompletable.rb', line 16 def display_method @options[:display_method] || :name end |
#target ⇒ Object
8 9 10 |
# File 'lib/generators/brain_damage/lib/views/inputs/autocompletable.rb', line 8 def target @options[:target] end |
#url ⇒ Object
12 13 14 |
# File 'lib/generators/brain_damage/lib/views/inputs/autocompletable.rb', line 12 def url @options[:url] || "/#{@options[:target]}/autocomplete" end |
#value_method ⇒ Object
20 21 22 |
# File 'lib/generators/brain_damage/lib/views/inputs/autocompletable.rb', line 20 def value_method @options[:value_method] || :id end |