title: <%= f.submit %> doesn't send the params to Controller.( Ruby On Rails )
body: <p>I made this simple form:</p>
  
  <pre><code>&lt;%= form_for @recipe do |f| %&gt;
      &lt;%= f.text_field :title, name: 'Título' %&gt;
      &lt;%= f.text_field :recipe_type, name: 'Tipo da Receita' %&gt;
      &lt;%= f.text_field :cuisine, name: 'Cozinha' %&gt;
      &lt;%= f.text_field :difficulty, name: 'Dificuldade' %&gt;
      &lt;%= f.text_field :cook_time, name: 'Tempo de Preparo' %&gt;
      &lt;%= f.text_area :ingredients, name: 'Ingredientes' %&gt;
      &lt;%= f.text_area :cook_method, name: 'Como Preparar' %&gt;
      &lt;%= f.submit :submit, name: 'Enviar %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>But when I submit it, I get this error:</p>
  
  <pre><code> Failure/Error: params.require(:recipe).permit(:title, :recipe_type, :cuisine, :difficulty, :cook_time, :ingredients, :cook_method)
  
       ActionController::ParameterMissing:
         param is missing or the value is empty: recipe
       # ./app/controllers/recipes_controller.rb:23:in `recipe_params'
       # ./app/controllers/recipes_controller.rb:16:in `create'
       # ./spec/features/user_register_recipe_spec.rb:18:in `block (2 levels) in &lt;top (required)&gt;'
  </code></pre>
  
  <p>The problem is in the submit button, I need it named Enviar, but I tried every possible combination and nothing works.
  I tried:</p>
  
  <pre><code>&lt;%= f.button :submit %&gt;      Unable to find link or button "Enviar"
  &lt;%= f.submit 'Enviar' %&gt;     I get the error of missing params
  &lt;%= f.submit :submit, name: 'Enviar' %&gt; Unable to find link or button "Enviar"
  
  </code></pre>
  
  <p>I don't know what to do anymore.
  Here my Controller:</p>
  
  <pre><code>class RecipesController &lt; ApplicationController
  
    def index
      @recipes = Recipe.all
    end
  
    def show
      @recipe = Recipe.find(params[:id])
    end
  
    def new
      @recipe = Recipe.new
    end
  
    def create
      @recipe = Recipe.new(recipe_params)
      if @recipe.save
        redirect_to recipe_path(@recipe)
      else 
        render :new
      end
    end
  
    private
      def recipe_params
        params.require(:recipe).permit(:title, :recipe_type, :cuisine, :difficulty, :cook_time, :ingredients, :cook_method)
      end
  
  end
  
  </code></pre>
  
  <p>My router:</p>
  
  <pre><code>Rails.application.routes.draw do
    root to: 'recipes#index'
    get 'recipes/new' =&gt; 'recipes#new', as: 'new_recipe'
    post 'recipes/new' =&gt; 'recipes#create'
    resources :recipes
  end
  
  </code></pre>
  
  <p>Edit: 
  (Error when can't find the button)</p>
  
  <pre><code>$ rspec spec
  
  User register recipe
    successfully (FAILED - 1)
  
  Visitor view recipe details
    successfully
    and return to recipe list
  
  Visitor visit homepage
    successfully
    and view recipe
    and view recipes list
  
  Failures:
  
    1) User register recipe successfully
       Failure/Error: click_on 'Enviar'
  
       Capybara::ElementNotFound:
         Unable to find link or button "Enviar"
       # ./spec/features/user_register_recipe_spec.rb:18:in `block (2 levels) in &lt;top (required)&gt;'
  
  Finished in 0.8137 seconds (files took 11.14 seconds to load)
  6 examples, 1 failure
  
  Failed examples:
  
  rspec ./spec/features/user_register_recipe_spec.rb:4 # User register recipe successfully
  </code></pre>
  
  <p>Error when missings mapam :recipe</p>
  
  <pre><code>rspec spec
  
  User register recipe
    successfully (FAILED - 1)
  
  Visitor view recipe details
    successfully
    and return to recipe list
  
  Visitor visit homepage
    successfully
    and view recipe
    and view recipes list
  
  Failures:
  
    1) User register recipe successfully
       Failure/Error: click_on 'Enviar uma receita'
  
       SyntaxError:
         /home/italo/Área de Trabalho/code-saga/3/cookbook_parte4/app/views/recipes/new.html.erb:11: syntax error, unexpected tLABEL, expecting '='
         ...buffer.append=( f.submit, name:'Enviar' );@output_buffer.saf...
         ...                          ^~~~~
       # ./spec/features/user_register_recipe_spec.rb:9:in `block (2 levels) in &lt;top (required)&gt;'
  
  Finished in 0.35119 seconds (files took 1.09 seconds to load)
  6 examples, 1 failure
  
  Failed examples:
  
  rspec ./spec/features/user_register_recipe_spec.rb:4 # User register recipe successfully
  </code></pre>