Is it possible to delete a record or to nullify the foreign key for a
record that is associated using a belongs_to association?
class BelieverOrNot < ActiveRecord::Base
belongs_to :deity, :foreign_key => ‘deity_id’
believer = new BelieverOrNot( :deity =>
Our believer stops believing, but the reference can’t be destroyed
believer.deity = nil # Doesn’t work
believer.deity_id = nil # Neither does this
After saving “believer”, the foreign key will still hold the same old
value. What’s wrong with this? What are we doing wrong?