Refactor JSON templates to be generated with ActiveModelSerializers instead of Rabl (#4090)
This commit is contained in:
parent
2d6128672f
commit
8b2cad5637
80 changed files with 425 additions and 301 deletions
|
@ -6,7 +6,7 @@ class PushUpdateWorker
|
|||
def perform(account_id, status_id)
|
||||
account = Account.find(account_id)
|
||||
status = Status.find(status_id)
|
||||
message = InlineRenderer.render(status, account, 'api/v1/statuses/show')
|
||||
message = InlineRenderer.render(status, account, :status)
|
||||
|
||||
Redis.current.publish("timeline:#{account.id}", Oj.dump(event: :update, payload: message, queued_at: (Time.now.to_f * 1000.0).to_i))
|
||||
rescue ActiveRecord::RecordNotFound
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue