Created
September 11, 2009 18:50
-
-
Save billsaysthis/185502 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 Note < ActiveRecord::Base | |
belongs_to :creator, :class_name => "User", :foreign_key => :creator_id | |
# Fix DB default problem for TEXT and BINARY | |
def initialize(attributes=nil) | |
super({:body => ''}.merge(attributes || {})) | |
end | |
def to_s | |
self.body | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment