Rails app does not recognize mass assigned belongs_to association in production -


I have an account model that falls under the account manager:

  class Account & lt; ActiveRecord :: Base is_to: account_manager ,: class_name = & gt; 'User' validates_presence_of: account_manager end  

My controller looks like this:

  def create account account = new (params [: account]). ..  

A request looks like this:

  To start the post "/ accounts" 74.61.248.151 on Sun 26 September 16: Processing as HTML parameter 12:26 +0000 2010 "Accounting" = "gtc:" "," account_manager_id "=> [" 171 "]}: {" Commit "=> "Create an account", "account" = & gt;, "authentication_token" => "T4ERO0iMtseI952LP / 9gf5EcYrRCE / 3pQFdSgqi3hNg =", "utf8" => 
"\ 342 \ 234 \ 223"}

For any reason, after submitting it, request the form that the account manager is empty but it is only on production, not on the local god. Has anyone seen this before? The only difference is that I I use RE on production, but I do not think this will be an issue as it is the functionality of the rail. The LG version is similar to local and products - 3.0.0

I had to hack this ugly: < / P>

  @ account.account_manager_id = params [: account] [: account_manager_id] .first.to_i Paramams until [[account] [: account_manager_id] .blank?  
< P> Maybe it's a rail bug, curious to see if other people have experience of this problem.


Comments