Module: Mentionable::ClassMethods

Defined in:
app/models/concerns/mentionable.rb

Instance Method Summary collapse

Instance Method Details

#attr_mentionable(attr, options = {}) ⇒ Object

Indicate which attributes of the Mentionable to search for GFM references.


13
14
15
16
# File 'app/models/concerns/mentionable.rb', line 13

def attr_mentionable(attr, options = {})
  attr = attr.to_s
  mentionable_attrs << [attr, options]
end

#mentionable_attrsObject

Accessor for attributes marked mentionable.


19
20
21
# File 'app/models/concerns/mentionable.rb', line 19

def mentionable_attrs
  @mentionable_attrs ||= []
end