Module: ActiveModel::AttributeFilters::Common::Presence::ClassMethods
- Defined in:
- lib/attribute-filters/common_filters/presence.rb
Overview
This submodule contains class methods used to easily define filter.
Instance Method Summary collapse
-
#fill_attributes(*args) ⇒ Object
(also: #fill_attribute, #fills_attribute, #fills_attributes)
Registers attributes that should be filled with some values.
Instance Method Details
#fill_attributes(*args) ⇒ Object Also known as: fill_attribute, fills_attribute, fills_attributes
Registers attributes that should be filled with some values.
52 53 54 55 56 57 58 59 |
# File 'lib/attribute-filters/common_filters/presence.rb', line 52 def fill_attributes(*args) setup_attributes_that :should_be_filled, args, { :fill_value => [:with, :fill_with, :fill, :value, :content, :default, :fill_value], :fill_any => [:all, :any, :fill_always, :always_fill, :always, :fill_present, :fill_all, :fill_any], :fill_enumerable => [:replace_enumerable, :replace_enums, :enums, :whole_enums, :fill_enums, :fill_enumerable] }, :fill_value end |