Sha256: da0606a3388d525dafc1d4edc7af0ef53f2468d5a52939743857d4698873bd6a

Contents?: true

Size: 529 Bytes

Versions: 29

Compression:

Stored size: 529 Bytes

Contents

# frozen_string_literal: true
module Hyrax
  class FeaturedWorkListsController < ApplicationController
    def create
      authorize! :update, FeaturedWork
      FeaturedWorkList.new.featured_works_attributes = list_params[:featured_works_attributes]
      respond_to do |format|
        format.html { redirect_to root_path }
        format.json { head :no_content }
      end
    end

    private

    def list_params
      params.require(:featured_work_list).permit(featured_works_attributes: [:id, :order])
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
hyrax-5.1.0.pre.beta1 app/controllers/hyrax/featured_work_lists_controller.rb
hyrax-5.0.4 app/controllers/hyrax/featured_work_lists_controller.rb
hyrax-5.0.3 app/controllers/hyrax/featured_work_lists_controller.rb
hyrax-5.0.2 app/controllers/hyrax/featured_work_lists_controller.rb
hyrax-5.0.1 app/controllers/hyrax/featured_work_lists_controller.rb
hyrax-5.0.0 app/controllers/hyrax/featured_work_lists_controller.rb
hyrax-5.0.0.rc3 app/controllers/hyrax/featured_work_lists_controller.rb
hyrax-5.0.0.rc2 app/controllers/hyrax/featured_work_lists_controller.rb
hyrax-5.0.0.rc1 app/controllers/hyrax/featured_work_lists_controller.rb
hyrax-3.6.0 app/controllers/hyrax/featured_work_lists_controller.rb
hyrax-4.0.0 app/controllers/hyrax/featured_work_lists_controller.rb
hyrax-4.0.0.rc3 app/controllers/hyrax/featured_work_lists_controller.rb
hyrax-4.0.0.rc2 app/controllers/hyrax/featured_work_lists_controller.rb
hyrax-4.0.0.rc1 app/controllers/hyrax/featured_work_lists_controller.rb
hyrax-3.5.0 app/controllers/hyrax/featured_work_lists_controller.rb
hyrax-4.0.0.beta2 app/controllers/hyrax/featured_work_lists_controller.rb
hyrax-3.4.2 app/controllers/hyrax/featured_work_lists_controller.rb
hyrax-4.0.0.beta1 app/controllers/hyrax/featured_work_lists_controller.rb
hyrax-3.4.1 app/controllers/hyrax/featured_work_lists_controller.rb
hyrax-3.4.0 app/controllers/hyrax/featured_work_lists_controller.rb