Sha256: 5f58f788498eede7e8e5462cbc4d9361630a91967113399eb74d533ab07b4842

Contents?: true

Size: 826 Bytes

Versions: 40

Compression:

Stored size: 826 Bytes

Contents

module Cmor
  module Galleries
    module Backend
      class PictureDetailsController < Cmor::Core::Backend::ResourcesController::Base
        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, :description, :picture_gallery_id, :published)
        end
      end
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
cmor_galleries_backend-0.0.41.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.40.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.39.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.38.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.37.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.36.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.35.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.34.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.33.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.32.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.31.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.30.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.29.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.28.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.27.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.26.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.25.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.24.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.22.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.21.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb