Class: LeanTag::Tag

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/lean_tag/tag.rb

Instance Method Summary collapse

Instance Method Details

#name=(value) ⇒ Object



13
14
15
16
17
18
# File 'lib/lean_tag/tag.rb', line 13

def name=(value)
  if value.present?
    self[:name] = value.gsub(/[^0-9a-zA-Z]+/, "")
    self[:name] = self[:name].downcase if LeanTag.config.force_lowercase
  end
end