class Cachai::Response
Public Instance Methods
as_json(options = {})
click to toggle source
# File lib/models.rb, line 140 def as_json(options = {}) { :id => id, :author_name => author_name, # :author_email => author_email, :author_img => author_img, :author_url => author_url, :content => content, :timestamp => created_at.to_i, :parent_id => parent_id, :type => response_type, # :created_at => created_at, :created_ago => Timeago.since(created_at) } end
parent()
click to toggle source
# File lib/models.rb, line 136 def parent @parent ||= Response.find(parent_id) rescue nil end