Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 84267a4c12
Fetching contributors…

Cannot retrieve contributors at this time

22 lines (17 sloc) 0.386 kb
class Note < BasicModel
def default_attributes
{
"title" => nil,
"description" => nil,
"tags" => [],
"visited_on" => Time.now.strftime('%Y/%m/%d')
}
end
##
# Coerce fields into the proper types of objects.
def on_update
if (tags = @attributes['tags']) && tags.is_a?(String)
@attributes['tags'] = tags.split(" ")
end
end
end
Jump to Line
Something went wrong with that request. Please try again.