Something I'm not getting ...
I have this in my model:
class Model < ActiveRecord::Base has_many :model_options
And I'm trying to do this:
model = Model.find(id) model.options.delete
But this is not deleting records from the database. Instead, I have to do this:
model.options.each do |option| option.delete end
... which may not be the best way.
So what's the best way please?
ruby-on-rails activerecord
paul
source share