Class: HasAttachedTags::Tagging

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/has_attached_tags/tagging.rb

Class Method Summary collapse

Class Method Details

.[](type:) ⇒ void

This method returns an undefined value.

Parameters:

  • type (String)


15
16
17
18
19
# File 'lib/has_attached_tags/tagging.rb', line 15

def self.[](type:)
  Class.new(self) do
    validate { errors.add(:tag, :unsupported, type: type) if tag && tag.type != type }
  end
end