Created
March 12, 2009 20:56
-
-
Save seivan/78281 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 BlogPost < ActiveRecord::Base | |
has_many :comments | |
acts_as_taggable_on :tag, :tag_date | |
validates_presence_of :subject, :content, :tag_list | |
def after_save | |
self.tag_date_list = self.created_at.split("-")[0..1] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment