title: Ruby on Rails: Form successfully submitted but no commit into database and no errors displayed
body: <p>I am a RoR newbie and I am currently making a grocery list app. When I tried to submit the form, it renders back to the same page and it doesn't display that I successfully made the grocery list. I checked my database and there's no data which has been commited. At the same time, there's no indication of error both in console or in the browser. Here are my controller, form and the association between a user and a grocery_list.</p>
  <pre><code> class GroceryListsController &lt; ApplicationController
  
   def new
       @grocery_list = GroceryList.new
   end
  
   def create
       @grocery_list = current_user.grocery_lists.build(grocery_list_params)
    if @grocery_list.save
       redirect_to grocery_lists_path, notice: &quot;Created successfully&quot;
    else
       render :new
     end
   end
  
   private
      def grocery_list_params
        params.require(:grocery_list).permit(:name, :date)
      end
   end
  </code></pre>
  <p>Here's my form</p>
  <pre><code>&lt;h1&gt;Make your grocery list&lt;/h1&gt;
  
  &lt;%= form_for GroceryList.new do |f| %&gt;
    &lt;%= f.text_field :name, placeholder:'Name of your grocery list' %&gt;
    &lt;%= f.date_field :date %&gt;
    &lt;%= f.submit 'Create list' %&gt;
  &lt;% end %&gt;
  </code></pre>
  <p>User model</p>
  <pre><code>class User &lt; ApplicationRecord
  
     devise :database_authenticatable, :registerable,
            :recoverable, :rememberable, :validatable
  
     has_many :grocery_lists
  end
  </code></pre>
  <p>and grocery_list model</p>
  <pre><code>class GroceryList &lt; ApplicationRecord
     belongs_to :user
     belongs_to :product
  end
  </code></pre>