Sha256: 6281301e247edc985492b1674064d5cabb68763f82f9f1cddf4fdd5fe712929d
Contents?: true
Size: 733 Bytes
Versions: 40
Compression:
Stored size: 733 Bytes
Contents
module Admin class PagesController < ApplicationController before_action(:authenticate_user!) if defined?(Devise) before_action { EffectiveResources.authorize!(self, :admin, :effective_pages) } include Effective::CrudController if (config = EffectivePages.layout) layout(config.kind_of?(Hash) ? config[:admin] : config) end submit :save, 'Save' submit :save, 'Save and Add New', redirect: :new submit :save, 'Save and View', redirect: -> { effective_pages.page_path(resource) } submit :save, 'Duplicate', only: :edit, redirect: -> { effective_pages.new_admin_page_path(duplicate_id: resource) } def permitted_params params.require(:effective_page).permit! end end end
Version data entries
40 entries across 40 versions & 1 rubygems