updated :dependent => :restrict option for has_many and has_one