summaryrefslogtreecommitdiff
path: root/app/controllers/api/v1
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2013-07-14 19:02:58 -0600
committermo khan <mo@mokhan.ca>2013-07-14 19:02:58 -0600
commitaf5afe04208610f9515df80800357227451cbac8 (patch)
treee1dbb552ec745415be7f9c621ee28520dc184b7a /app/controllers/api/v1
parent79ed2e22b433c4aac12a644f803998d86211914f (diff)
filter out creations without photos from the api
Diffstat (limited to 'app/controllers/api/v1')
-rw-r--r--app/controllers/api/v1/creations_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/api/v1/creations_controller.rb b/app/controllers/api/v1/creations_controller.rb
index 2c9ed7c4..2b3a55c2 100644
--- a/app/controllers/api/v1/creations_controller.rb
+++ b/app/controllers/api/v1/creations_controller.rb
@@ -5,7 +5,7 @@ module Api
respond_to :json
def index
- @creations = Creation.all.take(50)
+ @creations = Creation.includes(:user, :photos).where(:is_restricted => false).where('photos_count > 0').uniq
end
private