axiom_selection.rb revision 75c07b9f62d6b3f480775053d58c58ad1207ff5e
class_name: 'Axiom',
association_foreign_key: 'sentence_id',
join_table: "axioms_axiom_selections"
self.finished = false
end
# This seems to be the only way to remove the default scope
# (non-imported sentences) from the association
super.where(imported: [true, false])
end
# overwrite this in the "subclasses"
end
# This key is used for mutex locking: The selection only has to be done once,
# but many jobs may call it in parallel.
"#{self.class.to_s.underscore.dasherize}-#{id}"
end
self.finished = true
save!
end
end