Sha256: b2d9f8a7ca180bc98be9e076e6c9e7bc8cd26a6a0585a20431e729250c84fe97

Contents?: true

Size: 913 Bytes

Versions: 3

Compression:

Stored size: 913 Bytes

Contents

module Olivander
  class TestController < ApplicationController
    include Olivander::Resources::CrudController
    include Olivander::Resources::DefaultCrudChain

    def index
      execute_crud_chain(crud_action: :index) do |c|
        c.authorize_resource { puts 'block: authorize_resource'; true }
         .update { puts 'block: update'; true }
         .before_assign { puts 'block: before assign' }
         .after_assign { puts 'block: after assign' }
      end
    end

    # def crud_chain_update
    #   puts 'controller: update'
    # end

    # def crud_chain_index_update
    #   puts 'controller: index_update'
    # end

    # def crud_chain_before_load
    #   puts 'controller: before_load'
    # end

    # def crud_chain_after_update
    #   puts 'controller: after_update'
    # end

    # def crud_chain_index_after_update
    #   puts 'controller: index_after_update'
    # end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
five-two-nw-olivander-0.1.2.2 app/controllers/olivander/test_controller.rb
five-two-nw-olivander-0.1.2.1 app/controllers/olivander/test_controller.rb
five-two-nw-olivander-0.1.2 app/controllers/olivander/test_controller.rb