Sha256: 9905e11d3781e3e06bf2c62243d777b02d355d8a805c4eb1379a45e245b55779

Contents?: true

Size: 487 Bytes

Versions: 1

Compression:

Stored size: 487 Bytes

Contents

module Georgia
  module Api
    class MediaController < Georgia::ApplicationController

      def pictures
        authorize Ckeditor::Asset
        search_conditions = Georgia::MediaSearch.new(params.merge(only: [:pictures])).definition
        @search = Ckeditor::Asset.search(search_conditions).page(params[:page]).per(params.fetch(:per, 12))
        @pictures = Ckeditor::PictureDecorator.decorate_collection(@search.records)
        render layout: false
      end

    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
georgia-0.8.0 app/controllers/georgia/api/media_controller.rb