From 8844220c48d2ccf5110771c226021dd836b143f4 Mon Sep 17 00:00:00 2001 From: evazion Date: Sat, 25 Oct 2014 11:08:59 -0500 Subject: [PATCH] Ensure JSON API returns boolean for Post#has_large. Currently the JSON API returns null for false and 0 for true for this attribute. Cast it to a boolean instead. --- app/models/post.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/post.rb b/app/models/post.rb index dbe8e896f..9b6c72a21 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -172,7 +172,7 @@ class Post < ActiveRecord::Base end def has_large - has_large? + !!has_large? end def large_image_width