Sha256: 9074987a72361eaa3cf487598ab1d3744b9e0e9975fd4af2cafe79b7dd7d7b0f

Contents?: true

Size: 1013 Bytes

Versions: 23

Compression:

Stored size: 1013 Bytes

Contents

module EngineRouting
  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: :naf), session, flash, method)
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
naf-2.1.13 spec/support/engine_routing.rb
naf-2.1.12 spec/support/engine_routing.rb
naf-2.1.11 spec/support/engine_routing.rb
naf-2.1.10 spec/support/engine_routing.rb
naf-2.1.9 spec/support/engine_routing.rb
naf-2.1.8 spec/support/engine_routing.rb
naf-2.1.6 spec/support/engine_routing.rb
naf-2.1.5 spec/support/engine_routing.rb
naf-2.1.4 spec/support/engine_routing.rb
naf-2.1.3 spec/support/engine_routing.rb
naf-2.1.2 spec/support/engine_routing.rb
naf-2.1.1 spec/support/engine_routing.rb
naf-2.1.0 spec/support/engine_routing.rb
naf-2.0.4 spec/support/engine_routing.rb
naf-2.0.3 spec/support/engine_routing.rb
naf-2.0.2 spec/support/engine_routing.rb
naf-2.0.1 spec/support/engine_routing.rb
naf-2.0.0 spec/support/engine_routing.rb
naf-1.1.4 spec/support/engine_routing.rb
naf-1.1.3 spec/support/engine_routing.rb