Module: Formtastic::Inputs::Base

Extended by:
ActiveSupport::Autoload
Includes:
Associations, Database, Errors, Fileish, Hints, Html, Labelling, Naming, Options, Validations, Wrapping
Included in:
BooleanInput, CheckBoxesInput, CountryInput, DateInput, DatetimeInput, EmailInput, FileInput, HiddenInput, NumberInput, PasswordInput, PhoneInput, RadioInput, SearchInput, SelectInput, StringInput, TextInput, TimeInput, TimeZoneInput, UrlInput
Defined in:
lib/formtastic/inputs/base.rb,
lib/formtastic/inputs/base/html.rb,
lib/formtastic/inputs/base/hints.rb,
lib/formtastic/inputs/base/errors.rb,
lib/formtastic/inputs/base/naming.rb,
lib/formtastic/inputs/base/choices.rb,
lib/formtastic/inputs/base/fileish.rb,
lib/formtastic/inputs/base/options.rb,
lib/formtastic/inputs/base/timeish.rb,
lib/formtastic/inputs/base/database.rb,
lib/formtastic/inputs/base/wrapping.rb,
lib/formtastic/inputs/base/labelling.rb,
lib/formtastic/inputs/base/stringish.rb,
lib/formtastic/inputs/base/collections.rb,
lib/formtastic/inputs/base/validations.rb,
lib/formtastic/inputs/base/associations.rb,
lib/formtastic/inputs/base/grouped_collections.rb

Defined Under Namespace

Modules: Associations, Choices, Collections, Database, Errors, Fileish, GroupedCollections, Hints, Html, Labelling, Naming, Options, Stringish, Timeish, Validations, Wrapping

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Wrapping

#input_wrapping, #wrapper_dom_id, #wrapper_html_options

Methods included from Labelling

#label_from_options, #label_html, #label_html_options, #label_text, #localized_label, #render_label?, #requirement_text, #requirement_text_or_proc

Methods included from Associations

#association, #association_primary_key, #belongs_to?, #reflection

Methods included from Fileish

#file?

Methods included from Validations

#column_limit, #limit, #not_required_through_negated_validation!, #not_required_through_negated_validation?, #optional?, #required?, #validation_integer_only?, #validation_limit, #validation_max, #validation_min, #validations, #validations?, #validator_relevant?

Methods included from Naming

#as, #attributized_method_name, #humanized_method_name, #input_name, #sanitized_method_name, #sanitized_object_name

Methods included from Hints

#hint?, #hint_html, #hint_text, #hint_text_from_options

Methods included from Errors

#error_first_html, #error_html, #error_keys, #error_list_html, #error_none_html, #error_sentence_html, #errors, #errors?

Methods included from Database

#column, #column?

Methods included from Options

#formtastic_options, #input_options

Methods included from Html

#dom_id, #dom_index, #input_html_options, #to_html

Instance Attribute Details

#builderObject

Returns the value of attribute builder.



5
6
7
# File 'lib/formtastic/inputs/base.rb', line 5

def builder
  @builder
end

#methodObject

Returns the value of attribute method.



5
6
7
# File 'lib/formtastic/inputs/base.rb', line 5

def method
  @method
end

#objectObject

Returns the value of attribute object.



5
6
7
# File 'lib/formtastic/inputs/base.rb', line 5

def object
  @object
end

#object_nameObject

Returns the value of attribute object_name.



5
6
7
# File 'lib/formtastic/inputs/base.rb', line 5

def object_name
  @object_name
end

#optionsObject

Returns the value of attribute options.



5
6
7
# File 'lib/formtastic/inputs/base.rb', line 5

def options
  @options
end

#templateObject

Returns the value of attribute template.



5
6
7
# File 'lib/formtastic/inputs/base.rb', line 5

def template
  @template
end

Instance Method Details

#initialize(builder, template, object, object_name, method, options) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/formtastic/inputs/base.rb', line 7

def initialize(builder, template, object, object_name, method, options)
  @builder = builder
  @template = template
  @object = object
  @object_name = object_name
  @method = method
  @options = options.dup
end