Class: Formtastic::Inputs::NumericInput Deprecated

Inherits:
NumberInput show all
Defined in:
lib/formtastic/inputs/numeric_input.rb

Overview

Deprecated.

Use :as => :number instead

TODO:

Remove on or after 2.1

Alias for NumberInput for backwards compatibility with 1.x.

@example:

f.input :age, :as => :numeric

Instance Attribute Summary

Attributes included from Base

#builder, #method, #object, #object_name, #options, #template

Instance Method Summary collapse

Methods inherited from NumberInput

#input_html_options, #to_html

Methods included from Base::Stringish

#input_html_options, #placeholder_text, #to_html

Methods included from Base::Wrapping

#input_wrapping, #wrapper_dom_id, #wrapper_html_options

Methods included from Base::Labelling

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

Methods included from Base::Associations

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

Methods included from Base::Fileish

#file?

Methods included from Base::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 Base::Naming

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

Methods included from Base::Hints

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

Methods included from Base::Errors

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

Methods included from Base::Database

#column, #column?

Methods included from Base::Options

#formtastic_options, #input_options

Methods included from Base::Html

#dom_id, #dom_index, #input_html_options, #to_html

Constructor Details

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

Returns a new instance of NumericInput.



13
14
15
16
# File 'lib/formtastic/inputs/numeric_input.rb', line 13

def initialize(builder, template, object, object_name, method, options)
  ActiveSupport::Deprecation.warn(':as => :numeric has been deprecated in favor of :as => :number and will be removed on or after version 2.1', caller)
  super
end