Sha256: e8f927cca5b7f0554994dbddecb533776a17030631adf1e96ae5b08229ec89b9

Contents?: true

Size: 827 Bytes

Versions: 1

Compression:

Stored size: 827 Bytes

Contents

require 'rails_workflow/application_controller'
module RailsWorkflow
  class ProcessTemplatesController < ::InheritedResources::Base
    before_filter do
      @config_section_active = true
    end

    layout 'rails_workflow/application'

    def create
      # create!{ process_template_url(resource) }
      create!{ process_template_operation_templates_path(resource) }
    end

    def update
      update! { process_template_url(resource) }
    end

    def destroy
      destroy! { process_templates_url}
    end

    protected
    def permitted_params
      params.permit(process_template: [:title, :source, :manager_class, :process_class, :type])
    end


    def collection
      ::RailsWorkflow::ProcessTemplateDecorator.decorate_collection(super)
    end

    def resource
      super.decorate
    end


  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rails_workflow-0.2.1 app/controllers/rails_workflow/process_templates_controller.rb