Sha256: 4d6391722c03f458ffb5776b5f1d72eb80c46ab268ba0e570044fc720f19e189

Contents?: true

Size: 1.04 KB

Versions: 17

Compression:

Stored size: 1.04 KB

Contents

# frozen_string_literal: true

module ActiveElement
  # Default Rails actions to be performed if not defined by a controller, allows developers to
  # define a controller and have basic boilerplate for typical functionality which can be
  # overridden and customized as needed.
  module DefaultControllerActions
    extend ActiveSupport::Concern

    def index
      ActiveElement::DefaultController::Controller.new(controller: self).index
    end

    def show
      ActiveElement::DefaultController::Controller.new(controller: self).show
    end

    def new
      ActiveElement::DefaultController::Controller.new(controller: self).new
    end

    def create
      ActiveElement::DefaultController::Controller.new(controller: self).create
    end

    def edit
      ActiveElement::DefaultController::Controller.new(controller: self).edit
    end

    def update
      ActiveElement::DefaultController::Controller.new(controller: self).update
    end

    def destroy
      ActiveElement::DefaultController::Controller.new(controller: self).destroy
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
active_element-0.0.31 app/controllers/concerns/active_element/default_controller_actions.rb
active_element-0.0.30 app/controllers/concerns/active_element/default_controller_actions.rb
active_element-0.0.29 app/controllers/concerns/active_element/default_controller_actions.rb
active_element-0.0.28 app/controllers/concerns/active_element/default_controller_actions.rb
active_element-0.0.27 app/controllers/concerns/active_element/default_controller_actions.rb
active_element-0.0.26 app/controllers/concerns/active_element/default_controller_actions.rb
active_element-0.0.24 app/controllers/concerns/active_element/default_controller_actions.rb
active_element-0.0.23 app/controllers/concerns/active_element/default_controller_actions.rb
active_element-0.0.22 app/controllers/concerns/active_element/default_controller_actions.rb
active_element-0.0.21 app/controllers/concerns/active_element/default_controller_actions.rb
active_element-0.0.19 app/controllers/concerns/active_element/default_controller_actions.rb
active_element-0.0.18 app/controllers/concerns/active_element/default_controller_actions.rb
active_element-0.0.17 app/controllers/concerns/active_element/default_controller_actions.rb
active_element-0.0.16 app/controllers/concerns/active_element/default_controller_actions.rb
active_element-0.0.15 app/controllers/concerns/active_element/default_controller_actions.rb
active_element-0.0.14 app/controllers/concerns/active_element/default_controller_actions.rb
active_element-0.0.13 app/controllers/concerns/active_element/default_controller_actions.rb