I have uploaded the source code of model and migration at below link.

https://drive.google.com/file/d/0B6uWxuw822j9c1Z1X2F2eGxCclU/edit?usp=sharing

Anyone can create simple rails application, copy model & migration files 
on place.
Run rails console and execute below commands to reproduce error.

ExpenseType.new(:name => "Grocceries").save!
ExpenseType.new(:name => "Travel").save!
IncomeType.new(:name => "Salary").save!
IncomeType.new(:name => "Bonus").save!
Expense.new(:note => "a soda", :expense_type => ExpenseType.first)

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/2e537038f5467c96572dcb91cd2d1420%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to