Module: Concerns::Model::BaseThing
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#lists ⇒ Object
custom associations.
- #special_characters_excluded ⇒ Object
Instance Method Details
#lists ⇒ Object
custom associations
48 |
# File 'lib/concerns/model/base_thing.rb', line 48 def lists; List.where(thing_type: self.to_s); end |
#special_characters_excluded ⇒ Object
50 51 52 53 54 55 56 |
# File 'lib/concerns/model/base_thing.rb', line 50 def special_characters_excluded if name.match(/\//) errors[:name] << I18n.t( 'activerecord.errors.models.thing.attributes.name.unwanted_special_characters_included' ) end end |