diff options
| author | mo khan <mo@mokhan.ca> | 2015-01-11 10:54:48 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2015-01-11 10:54:48 -0700 |
| commit | dde94a30f1b0193e89b88eef48d81a77cbab7a9f (patch) | |
| tree | 1ce265f96c38e9152883b4e626c1130d6501fc52 /app/controllers/api | |
| parent | 50eaeae7ef98f66ed187ff8193d8b73dc390681b (diff) | |
only load processed images.
Diffstat (limited to 'app/controllers/api')
| -rw-r--r-- | app/controllers/api/v2/cakes_controller.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/controllers/api/v2/cakes_controller.rb b/app/controllers/api/v2/cakes_controller.rb index b683c1e6..c310323d 100644 --- a/app/controllers/api/v2/cakes_controller.rb +++ b/app/controllers/api/v2/cakes_controller.rb @@ -10,6 +10,7 @@ module Api def index @cakes = paginate(repository.search_with(params).includes(:category)) + @photos = Photo.processed.where(imageable_id: @cakes.pluck(:id)) end def show(id = params[:id]) |
