Sha256: 9a17ee51bb2a55eefab1852b47060a38284ff356bd8f32855e0f675aef458178
Contents?: true
Size: 1.15 KB
Versions: 18
Compression:
Stored size: 1.15 KB
Contents
### START Tag Subclasses ### module Tagtical class Tag class Language < Tagtical::Tag end class PartTag < Tagtical::Tag def dump_value(value) value && value.downcase end end end end module Tag class Skill < Tagtical::Tag def load_value(value) value.gsub("ball", "baller") if value end end class FooCraft < Skill # Multiple levels of inheritance end end class NeedTag < Tagtical::Tag # Tag subclass ending in "Tag" end class Offering < Tagtical::Tag # Top level end ### END Tag Subclasses ### class TaggableModel < ActiveRecord::Base acts_as_taggable(:languages, :skills, {:crafts => Tag::FooCraft}, :needs, :offerings) has_many :untaggable_models end class CachedModel < ActiveRecord::Base acts_as_taggable end class OtherTaggableModel < ActiveRecord::Base acts_as_taggable(:languages, :needs, :offerings) end class InheritingTaggableModel < TaggableModel end class AlteredInheritingTaggableModel < TaggableModel acts_as_taggable(:parts) end class TaggableUser < ActiveRecord::Base acts_as_tagger end class UntaggableModel < ActiveRecord::Base belongs_to :taggable_model end
Version data entries
18 entries across 18 versions & 1 rubygems