mirror of
https://github.com/moebooru/moebooru
synced 2025-08-22 01:47:48 +00:00
branch : moe extra : convert_revision : svn%3A2d28d66d-8d94-df11-8c86-00306ef368cb/trunk/moe%405
14 lines
652 B
Ruby
14 lines
652 B
Ruby
class NoteVersion < ActiveRecord::Base
|
|
def to_xml(options = {})
|
|
{:created_at => created_at, :updated_at => updated_at, :creator_id => user_id, :x => x, :y => y, :width => width, :height => height, :is_active => is_active, :post_id => post_id, :body => body, :version => version}.to_xml(options.merge(:root => "note_version"))
|
|
end
|
|
|
|
def to_json(*args)
|
|
{:created_at => created_at, :updated_at => updated_at, :creator_id => user_id, :x => x, :y => y, :width => width, :height => height, :is_active => is_active, :post_id => post_id, :body => body, :version => version}.to_json(*args)
|
|
end
|
|
|
|
def author
|
|
User.find_name(user_id)
|
|
end
|
|
end
|