[Rails] Re: Help needed for error in foreign key validation

2012-11-17 Thread Frederick Cheung
On Nov 17, 10:19 am, rubyrookie asajn...@gmail.com wrote:  Can you tell me how to fix the issue? If I remove the  validates_presence_of :country I get a database error as expected when i update bank table with a country id not in country table. class Bank ActiveRecord::Base  

[Rails] Re: Help needed for error in foreign key validation

2012-11-17 Thread rubyrookie
Thanks worked. On Saturday, November 17, 2012 3:11:33 AM UTC-8, Frederick Cheung wrote: On Nov 17, 10:19 am, rubyrookie asajn...@gmail.com wrote: Can you tell me how to fix the issue? If I remove the validates_presence_of :country I get a database error as expected when i