title: "Category(#2203433720) expected, got String(#2155957040)" Collection_select returning string instead of integer
body: <p>I have two models "Events" and "Categories". Event model has integer type "category" that belongs_to "Category". Category model has key:value that stores these categories such as 1: Medical 2: Health 3: Food, etc. </p>
  
  <pre><code>class Event &lt; ActiveRecord::Base
   belongs_to :category
  end
  
  class Category &lt; ActiveRecord::Base
    has_many :events, foreign_key: "category"
  end
  </code></pre>
  
  <p>My schema is:</p>
  
  <pre><code>create_table "categories", force: true do |t|
   t.string   "name"
   t.datetime "created_at"
   t.datetime "updated_at"
  end
  
  create_table "events", force: true do |t|
   t.string   "name"
   t.integer  "category"
   t.datetime "created_at"
   t.datetime "updated_at"
  end
  </code></pre>
  
  <p>I am using simple forms and maybe this is where I am going wrong but I am returning the right value but just as a string. For example, if I selected medical from the drop down it would be return the correct "1" but just as a string and not the required integer.</p>
  
  <p>/views/events</p>
  
  <pre><code>&lt;%= f.input :category, as: :select, collection: Category.all, include_blank: "Select a category..." %&gt;
  </code></pre>
  
  <p>My drop down is displaying properly and returning the correct value but as a string and not an integer. Is there a best way to fix this?</p>