app/models/kithe/work.rb in kithe-2.0.0.pre.alpha2 vs app/models/kithe/work.rb in kithe-2.0.0.pre.beta1
- old
+ new
@@ -1,10 +1,5 @@
class Kithe::Work < Kithe::Model
- # Works don't have derivatives, but we want to allow Rails eager loading
- # of association on hetereogenous fetches of Kithe::Model, so this is clever.
- has_many :derivatives, -> { none }
- private :derivatives, :derivatives=, :derivative_ids, :derivative_ids=
-
after_initialize do
self.kithe_model_type = "work" if self.kithe_model_type.nil?
end
before_validation do
self.kithe_model_type = "work" if self.kithe_model_type.nil?