Sha256: 2ef6cfedf3ec90b5eb72b9c44c528ce74332f30f2cda91958874afe83795a46b

Contents?: true

Size: 540 Bytes

Versions: 24

Compression:

Stored size: 540 Bytes

Contents

<% module_namespacing do -%>
class <%= class_name %>CommandController < ApplicationController
  include Riveter::CommandController

  # register as controller for specified command
  command_controller_for <%= class_name %>Command<%= additional_args %>

  def on_success(command, result)
    # TODO: provide path for redirect
    respond_to do |format|
      format.html { redirect_to '/', :notice => <%= class_name %>Command.success_notice }
      format.json { render :status => :completed }
      format.js
    end
  end

end
<% end -%>

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
riveter-0.8.3 lib/generators/riveter/command_controller/templates/command_controller.rb
riveter-0.8.2 lib/generators/riveter/command_controller/templates/command_controller.rb
riveter-0.8.1 lib/generators/riveter/command_controller/templates/command_controller.rb
riveter-0.8.0 lib/generators/riveter/command_controller/templates/command_controller.rb
riveter-0.7.0 lib/generators/riveter/command_controller/templates/command_controller.rb
riveter-0.6.0 lib/generators/riveter/command_controller/templates/command_controller.rb
riveter-0.3.0 lib/generators/riveter/command_controller/templates/command_controller.rb
riveter-0.2.1 lib/generators/riveter/command_controller/templates/command_controller.rb
riveter-0.2.0 lib/generators/riveter/command_controller/templates/command_controller.rb
riveter-0.1.1 lib/generators/riveter/command_controller/templates/command_controller.rb
riveter-0.0.15 lib/generators/riveter/command_controller/templates/command_controller.rb
riveter-0.0.14 lib/generators/riveter/command_controller/templates/command_controller.rb
riveter-0.0.13 lib/generators/riveter/command_controller/templates/command_controller.rb
riveter-0.0.12 lib/generators/riveter/command_controller/templates/command_controller.rb
riveter-0.0.11 lib/generators/riveter/command_controller/templates/command_controller.rb
riveter-0.0.10 lib/generators/riveter/command_controller/templates/command_controller.rb
riveter-0.0.9 lib/generators/riveter/command_controller/templates/command_controller.rb
riveter-0.0.8 lib/generators/riveter/command_controller/templates/command_controller.rb
riveter-0.0.7 lib/generators/riveter/command_controller/templates/command_controller.rb
riveter-0.0.6 lib/generators/riveter/command_controller/templates/command_controller.rb