From: rasfast@... Date: 2008-09-02T19:19:38+09:00 Subject: Record cannot be saved Hi, all! Maybe a noob question, sorry, but I'm really stuck with this. I have 2 models with has_many and belongs_to associations. class Transaction < ActiveRecord::Base has_many :bonuses, :class_name => 'TransactionBonus' end class TransactionBonus < ActiveRecord::Base belongs_to :transaction end The problem is that I cannot save TransactionBonus record to the database - it's simply doesn't do anything! Here is my irb console output with test records: >> transaction=Transaction.find(1) => # >> transaction.bonuses => [] >> bonus=transaction.bonuses.create(:transaction_id => 1,:taken_bonus => 123,:collected_bonus => 34,:final_sum => 99) => # >> transaction.bonuses => [#] >> bonus.save => # >> bonus => # Please, note id: nil for the bonus var, it means that the record is not saved to the database. Can you suggest why?