app/controllers/georgia/api/media_controller.rb in georgia-0.7.7 vs app/controllers/georgia/api/media_controller.rb in georgia-0.7.8

- old
+ new

@@ -1,11 +1,11 @@ module Georgia module Api class MediaController < Georgia::ApplicationController def pictures - @pictures = Georgia::Indexer.search(Ckeditor::Picture, params.merge(per: 12)) - @pictures = Ckeditor::PictureDecorator.decorate_collection(@pictures) + @search = Georgia::Indexer.search(Ckeditor::Picture, params.merge(per: 12)) + @pictures = Ckeditor::PictureDecorator.decorate_collection(@search.results) render layout: false end end end \ No newline at end of file