Sha256: 873d179ffecc6b84b3cb6f43f179b080c2a79ca9a48df390f7ed370f1e31be6b

Contents?: true

Size: 732 Bytes

Versions: 49

Compression:

Stored size: 732 Bytes

Contents

module Cmor
  module Testimonials
    module Backend
      class TestimonialsController < Cmor::Core::Backend::ResourcesController::Base
        include Rao::ResourcesController::ActsAsListConcern
        include Rao::ResourcesController::ActsAsPublishedConcern

        def self.resource_class
          Cmor::Testimonials::Testimonial
        end

        private

        def load_collection_scope
          super.eager_load(:category)
        end

        def permitted_params
          params.require(:testimonial).permit(:category_id, :fullname, :role, :company, :body, :published, :image)
        end

        def after_reposition_location
          request.headers["Referer"] || super
        end
      end
    end
  end
end

Version data entries

49 entries across 49 versions & 1 rubygems

Version Path
cmor_testimonials_backend-0.0.16.pre app/controllers/cmor/testimonials/backend/testimonials_controller.rb
cmor_testimonials_backend-0.0.15.pre app/controllers/cmor/testimonials/backend/testimonials_controller.rb
cmor_testimonials_backend-0.0.14.pre app/controllers/cmor/testimonials/backend/testimonials_controller.rb
cmor_testimonials_backend-0.0.13.pre app/controllers/cmor/testimonials/backend/testimonials_controller.rb
cmor_testimonials_backend-0.0.12.pre app/controllers/cmor/testimonials/backend/testimonials_controller.rb
cmor_testimonials_backend-0.0.11.pre app/controllers/cmor/testimonials/backend/testimonials_controller.rb
cmor_testimonials_backend-0.0.10.pre app/controllers/cmor/testimonials/backend/testimonials_controller.rb
cmor_testimonials_backend-0.0.9.pre app/controllers/cmor/testimonials/backend/testimonials_controller.rb
cmor_testimonials_backend-0.0.8.pre app/controllers/cmor/testimonials/backend/testimonials_controller.rb