Sha256: 36a88e883bd7d8b8a7ef4378bc86493e889bef27cf520abb0e7cbc024fbc8eb1

Contents?: true

Size: 1.03 KB

Versions: 65

Compression:

Stored size: 1.03 KB

Contents

module ControllerHooks
  def get(action, parameters = nil, session = nil, flash = nil)
    process_action(action, parameters, session, flash, "GET")
  end

  # Executes a request simulating POST HTTP method and set/volley the response
  def post(action, parameters = nil, session = nil, flash = nil)
    process_action(action, parameters, session, flash, "POST")
  end

  # Executes a request simulating PUT HTTP method and set/volley the response
  def put(action, parameters = nil, session = nil, flash = nil)
    process_action(action, parameters, session, flash, "PUT")
  end

  # Executes a request simulating DELETE HTTP method and set/volley the response
  def delete(action, parameters = nil, session = nil, flash = nil)
    process_action(action, parameters, session, flash, "DELETE")
  end

  private

    def process_action(action, parameters = nil, session = nil, flash = nil, method = "GET")
      parameters ||= {}
      process(action, parameters.merge!(:use_route => Ckeditor::Engine.engine_name), session, flash, method)
    end
end

Version data entries

65 entries across 65 versions & 4 rubygems

Version Path
ckeditor-4.1.3 test/support/controller_hooks.rb
glebtv-ckeditor-4.4.7.4 test/support/controller_hooks.rb
ckeditor-4.1.2 test/support/controller_hooks.rb
glebtv-ckeditor-4.4.7.3 test/support/controller_hooks.rb
glebtv-ckeditor-4.4.7.2 test/support/controller_hooks.rb
glebtv-ckeditor-4.4.7.1 test/support/controller_hooks.rb
glebtv-ckeditor-4.4.7 test/support/controller_hooks.rb
glebtv-ckeditor-4.4.6 test/support/controller_hooks.rb
ckeditor-4.1.1 test/support/controller_hooks.rb
glebtv-ckeditor-4.4.3.4 test/support/controller_hooks.rb
glebtv-ckeditor-4.4.3.3 test/support/controller_hooks.rb
glebtv-ckeditor-4.4.3.2 test/support/controller_hooks.rb
glebtv-ckeditor-4.4.3.1 test/support/controller_hooks.rb
glebtv-ckeditor-4.4.3.0 test/support/controller_hooks.rb
glebtv-ckeditor-4.3.2.6 test/support/controller_hooks.rb
ckeditor-4.1.0 test/support/controller_hooks.rb
glebtv-ckeditor-4.3.2.5 test/support/controller_hooks.rb
ckeditor-4.0.11 test/support/controller_hooks.rb
glebtv-ckeditor-4.3.2.4 test/support/controller_hooks.rb
glebtv-ckeditor-4.3.2.3 test/support/controller_hooks.rb