Module: ActiveModel::AttributeFilters::Common::Case::ClassMethods
- Defined in:
- lib/attribute-filters/common_filters/case.rb,
lib/attribute-filters/common_filters/case.rb,
lib/attribute-filters/common_filters/case.rb,
lib/attribute-filters/common_filters/case.rb
Overview
This submodule contains class methods used to easily define filter.
Instance Method Summary collapse
-
#capitalize_attributes(*args) ⇒ Object
(also: #capitalize_attribute, #capitalizes_attribute, #capitalizes_attributes)
Registers attributes that should be capitalized.
-
#downcase_attributes(*args) ⇒ Object
(also: #downcase_attribute, #downcases_attribute, #downcases_attributes)
Registers attributes that should be downcased.
-
#fully_capitalize_attributes(*args) ⇒ Object
(also: #fully_capitalize_attribute, #fully_capitalizes_attribute, #fully_capitalizes_attributes, #titleize_with_squeezed_spaces)
Registers attributes that should be fully capitalized.
-
#titleize_attributes(*args) ⇒ Object
(also: #titleize_attribute, #titleizes_attribute, #titleizes_attributes)
Registers attributes that should be titleized.
-
#upcase_attributes(*args) ⇒ Object
(also: #upcase_attribute, #upcases_attribute, #upcases_attributes)
Registers attributes that should be upcased.
Instance Method Details
#capitalize_attributes(*args) ⇒ Object Also known as: capitalize_attribute, capitalizes_attribute, capitalizes_attributes
Registers attributes that should be capitalized.
152 153 154 |
# File 'lib/attribute-filters/common_filters/case.rb', line 152 def capitalize_attributes(*args) attributes_that(:should_be_capitalized, args) end |
#downcase_attributes(*args) ⇒ Object Also known as: downcase_attribute, downcases_attribute, downcases_attributes
Registers attributes that should be downcased.
42 43 44 |
# File 'lib/attribute-filters/common_filters/case.rb', line 42 def downcase_attributes(*args) attributes_that(:should_be_downcased, args) end |
#fully_capitalize_attributes(*args) ⇒ Object Also known as: fully_capitalize_attribute, fully_capitalizes_attribute, fully_capitalizes_attributes, titleize_with_squeezed_spaces
Registers attributes that should be fully capitalized.
160 161 162 |
# File 'lib/attribute-filters/common_filters/case.rb', line 160 def fully_capitalize_attributes(*args) attributes_that(:should_be_fully_capitalized, args) end |
#titleize_attributes(*args) ⇒ Object Also known as: titleize_attribute, titleizes_attribute, titleizes_attributes
Registers attributes that should be titleized.
102 103 104 |
# File 'lib/attribute-filters/common_filters/case.rb', line 102 def titleize_attributes(*args) attributes_that(:should_be_titleized, args) end |
#upcase_attributes(*args) ⇒ Object Also known as: upcase_attribute, upcases_attribute, upcases_attributes
Registers attributes that should be upcased.
72 73 74 |
# File 'lib/attribute-filters/common_filters/case.rb', line 72 def upcase_attributes(*args) attributes_that(:should_be_upcased, args) end |