Created
August 19, 2009 18:14
-
-
Save charly/170539 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Asset < ActiveRecord::Base | |
acts_as_taggable_on :tags, :people | |
# FIRST ATTEMPT | |
def tag_list=(new_tags) | |
set_tag_list_on('tags',new_tags.downcase) | |
end | |
def person_list=(new_tags) | |
set_tag_list_on('people',new_tags.downcase) | |
end | |
# SECOND and successful ATTEMPT | |
module HackTag | |
def set_tag_list_on(context, new_tags, tagger=nil) | |
super(context, new_tags.downcase, tagger=nil) | |
end | |
end | |
include HackTag | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment