Sha256: 4e6ec4f7dc604c9864e99ea143e1ab698af183f8bf4a4e3ea47c01c315ab3efa
Contents?: true
Size: 1.13 KB
Versions: 3
Compression:
Stored size: 1.13 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 Craft < 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, :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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
tagtical-1.0.8 | spec/models.rb |
tagtical-1.0.7 | spec/models.rb |
tagtical-1.0.6 | spec/models.rb |