Topic: ID field with different name -- how do i handle composite primary keys

I have created a sample ROR application with two tables
ab_transactions and ab_carddetails

ab_transaction [ transaction_id,type,entry_method,terminal_no] -->Primary key (transactio_id)
ab_carddetails [card_no,transaction_id,name,expiry_date] --> primary key[card_no,tranactio_id(FK)]

Since i am using transaction_id, card_no etc for normal 'id' i am unable to do basic action like show , edit etc.

Getting erro message like 'Couldn't find Abcarddetail without an ID' when i do a show action
Please tell me how to handle composite primary keys also

I am new to Ruby and Rails Plese reply for this

Thanks and regards,
Eldo