Class: BrainDamage::View::Base::Form

Inherits:
Base show all
Defined in:
lib/generators/brain_damage/lib/views/schemas/base/form.rb

Constant Summary

Constants inherited from Templateable::ViewTemplateable

Templateable::ViewTemplateable::OVERWRITEABLE_HEADER

Instance Attribute Summary

Attributes inherited from Base

#file_name

Attributes inherited from Templateable::Base

#inner_html, #options, #template_file

Instance Method Summary collapse

Methods inherited from Base

#fields, has_template?, #infer_file_name, #is_partial_file_name?, #method_missing, #partialize_file_name, #set_file_and_template_names

Methods inherited from Templateable::ViewTemplateable

overwrite?, #render, skip_overwrite?

Methods inherited from Templateable::Base

#indent, #method_missing, #render, #render_erb_file, #render_erb_string, #render_template_file

Constructor Details

#initialize(resource, options = {}) ⇒ Form

Returns a new instance of Form.



5
6
7
8
9
10
11
12
# File 'lib/generators/brain_damage/lib/views/schemas/base/form.rb', line 5

def initialize(resource, options = {})
  options = {
    multipart: false,
    remote: false
  }.merge options

  super resource, options
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class BrainDamage::View::Base::Base

Instance Method Details

#multipart?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/generators/brain_damage/lib/views/schemas/base/form.rb', line 14

def multipart?
  @options[:multipart]
end

#remote?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/generators/brain_damage/lib/views/schemas/base/form.rb', line 18

def remote?
  @options[:remote]
end