Module: ActiveModel::AttributeFilters::Common::Squeeze::ClassMethods
- Defined in:
- lib/attribute-filters/common_filters/squeeze.rb,
lib/attribute-filters/common_filters/squeeze.rb
Overview
This submodule contains class methods used to easily define filter.
Instance Method Summary collapse
-
#squeeze_attributes(*args) ⇒ Object
(also: #squeeze_attribute, #squeezes_attribute, #squeezes_attributes)
Registers attributes that should be squeezed.
-
#squish_attributes(*args) ⇒ Object
(also: #squish_attribute, #squishes_attribute, #squishes_attributes)
Registers attributes that should be squished.
Instance Method Details
#squeeze_attributes(*args) ⇒ Object Also known as: squeeze_attribute, squeezes_attribute, squeezes_attributes
Registers attributes that should be squeezed.
47 48 49 50 51 52 53 |
# File 'lib/attribute-filters/common_filters/squeeze.rb', line 47 def squeeze_attributes(*args) setup_attributes_that :should_be_squeezed, args, { :squeeze_other_str => [:squeeze_other_str, :other_str, :string, :with_string, :with_characters, :with_character, :characters] }, :squeeze_other_str end |
#squish_attributes(*args) ⇒ Object Also known as: squish_attribute, squishes_attribute, squishes_attributes
Registers attributes that should be squished.
81 82 83 |
# File 'lib/attribute-filters/common_filters/squeeze.rb', line 81 def squish_attributes(*args) attributes_that(:should_be_squished, args) end |