Module: Undercarriage::Controllers::Restful::Actions::EditConcern

Extended by:
ActiveSupport::Concern
Defined in:
lib/undercarriage/controllers/restful/actions/edit_concern.rb

Overview

Edit restful action

Examples:

Controller

class ExamplesController < ApplicationController
  include Undercarriage::Controllers::Restful::Actions::EditConcern
end

Instance Method Summary collapse

Instance Method Details

#editObject

Edit action

Examples:

Controller

class ExamplesController < ApplicationController
  include Undercarriage::Controllers::RestfulConcern

  ##
  # This method is only needed if you want to override the action entirely. Otherwise, it is not needed.
  # Database resources can be accessed as `@edit_resource` or `@example`
  #
  # def edit
  #   ...
  # end
end


41
42
43
44
# File 'lib/undercarriage/controllers/restful/actions/edit_concern.rb', line 41

def edit
  nested_resource_pre_build
  nested_resource_build
end