Sha256: fead3e2aaea22564ec19e02a77c42229e3c58ae1655f24cd037a87b8f6f5f949

Contents?: true

Size: 965 Bytes

Versions: 14

Compression:

Stored size: 965 Bytes

Contents

module Cmor
  module Galleries
    module Backend
      class PictureDetailsController < Cmor::Core::Backend::ResourcesController::Base
        include Rao::ResourcesController::ActsAsPublishedConcern
        include Rao::ResourcesController::ActsAsListConcern

        helper Twitter::Bootstrap::Components::Rails::V4::ComponentsHelper

        def self.resource_class
          Cmor::Galleries::PictureDetail
        end

        def self.available_rest_actions
          super - %i(new)
        end

        private

        def load_collection_scope
          scope = super.joins(:picture_gallery).order(picture_gallery_id: :asc, position: :asc)
          with_conditions_from_query(scope)
        end

        def after_destroy_location
          last_location
        end

        def permitted_params
          params.require(:picture_detail).permit(:title, :identifier, :description, :picture_gallery_id, :published)
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
cmor_galleries_backend-0.0.60.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.59.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.58.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.57.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.56.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.55.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.54.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.53.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.52.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.51.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.50.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.49.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.48.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.45.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb