Sha256: cd97a530a5363b020ea49f4ec9efce05ea848f002f4967a739114d93d57938d9

Contents?: true

Size: 507 Bytes

Versions: 10

Compression:

Stored size: 507 Bytes

Contents

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

    protected

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

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
hyrax-1.1.1 app/controllers/hyrax/featured_work_lists_controller.rb
hyrax-1.1.0 app/controllers/hyrax/featured_work_lists_controller.rb
hyrax-1.0.5 app/controllers/hyrax/featured_work_lists_controller.rb
hyrax-1.0.4 app/controllers/hyrax/featured_work_lists_controller.rb
hyrax-1.0.3 app/controllers/hyrax/featured_work_lists_controller.rb
hyrax-1.0.2 app/controllers/hyrax/featured_work_lists_controller.rb
hyrax-1.0.1 app/controllers/hyrax/featured_work_lists_controller.rb
hyrax-1.0.0.rc2 app/controllers/hyrax/featured_work_lists_controller.rb
hyrax-1.0.0.rc1 app/controllers/hyrax/featured_work_lists_controller.rb
test_hyrax-0.0.1.alpha app/controllers/hyrax/featured_work_lists_controller.rb