Method: ActiveModel::AttributeFilters#filtered_attribute
- Defined in:
- lib/attribute-filters/dsl_sets.rb
#filtered_attribute(attribute_name = nil) ⇒ AttributeSet Also known as: are_attributes, the_attribute, is_the_attribute, has_the_attribute, are_the_attributes
Note:
The returned value is a duplicate. Adding or removing elements to it will have no effect. Altering attribute sets is possible on a class-level only, since attribute sets are part of models’ interfaces.
Returns the set of set names that the attribute of the given name belongs to.
If the given attribute name is nil
then it is taken from the name of a next method in a method call chain.
201 202 203 |
# File 'lib/attribute-filters/dsl_sets.rb', line 201 def filtered_attribute(attribute_name = nil) ActiveModel::AttributeSet::AttrQuery.new(attribute_name, self) end |