Sha256: 80469a5550b2f1ca1b8febb8e54a27403c58c086e734c2ab78f84ff8b36cbde9

Contents?: true

Size: 839 Bytes

Versions: 3

Compression:

Stored size: 839 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, :identifier, :description, :picture_gallery_id, :published)
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cmor_galleries_backend-0.0.44.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.43.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb
cmor_galleries_backend-0.0.42.pre app/controllers/cmor/galleries/backend/picture_details_controller.rb