Here’s a simple example of how to create a form specifying the controller action method in the form request.

rails-form

routes.rb

  match '/load',      to: 'load#new',           via: 'get'
  match '/load',      to: 'load#create',        via: 'post'

load/new.html.erb


<%= form_tag({controller: "load", action: "new"}, method: "post") do %>
    <%= label_tag(:q, "Search for:") %>
    <%= text_field_tag(:q) %>
    <%= submit_tag("Search") %>
<% end %>

load_controller.rb

class LoadController < ApplicationController

  def new

  end

  def create
    raise "foo"
  end

end

Here I am just purposely raising an exception to see if I hit the create method.

Running it looks like this

rails-parameters

You can see and pull the request params at the bottom like this:

  def create
    ...
    query = params[:q]
  end