Newer
Older
alias_method :share_with_original, :share_with
def share_with(*args)
fantasy_resque do
share_with_original(*args)
end
end
def post(class_name, opts = {})
fantasy_resque do
p = build_post(class_name, opts)
if p.save!
self.aspects.reload
Raphael Sofaer
a validé
aspects = self.aspects_from_ids(opts[:to])
add_to_streams(p, aspects)
unless opts[:created_at]
p.created_at = Time.now - 1
p
end
end
def comment(text, options = {})
fantasy_resque do
Raphael Sofaer
a validé
c = build_comment(options.merge(:text => text))
Postzord::Dispatch.new(self, c).post
MrZYX
a validé
def like(positive, options ={})
fantasy_resque do
Raphael Sofaer
a validé
l = build_like(options.merge(:positive => positive))
MrZYX
a validé
if l.save!
Postzord::Dispatch.new(self, l).post
end
l
end
end
p = self.post(:status_message, :text => 'hi', :to => self.aspects.first)