Module: ActiveInteraction::ActiveRecordable
- Included in:
- Base
- Defined in:
- lib/active_interaction/concerns/active_recordable.rb
Overview
Implement the minimal ActiveRecord interface.
Instance Method Summary collapse
-
#column_for_attribute(name) ⇒ Filter::Column?
Returns the column object for the named filter.
-
#has_attribute?(name) ⇒ Boolean
Returns true if a filter of that name exists.
Instance Method Details
#column_for_attribute(name) ⇒ Filter::Column?
Returns the column object for the named filter.
26 27 28 29 |
# File 'lib/active_interaction/concerns/active_recordable.rb', line 26 def column_for_attribute(name) filter = self.class.filters[name] Filter::Column.intern(filter.database_column_type) if filter end |
#has_attribute?(name) ⇒ Boolean
Returns true if a filter of that name exists.
49 50 51 |
# File 'lib/active_interaction/concerns/active_recordable.rb', line 49 def has_attribute?(name) # rubocop:disable Naming/PredicateName self.class.filters.key?(name.to_sym) end |