From 79395a8b2ad55522ee129fd6258c3a2dddc58823 Mon Sep 17 00:00:00 2001 From: evazion Date: Sat, 25 Oct 2014 12:21:18 -0500 Subject: [PATCH] Include ugoira data in post JSON API. --- app/models/post.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/models/post.rb b/app/models/post.rb index dbe8e896f..35436bd8a 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -1229,8 +1229,14 @@ class Post < ActiveRecord::Base list end + def associated_attributes + [ :pixiv_ugoira_frame_data ] + end + def serializable_hash(options = {}) options ||= {} + options[:include] ||= [] + options[:include] += associated_attributes options[:except] ||= [] options[:except] += hidden_attributes unless options[:builder]