-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
None
I have this situation using v4 beta1:
class Exercsie has_many :repetitions end class Repetition belongs_to :exercise end class ParticularRepetition < Repetition end
Based on some condition a push in repetitions a subclass of Repetition.
This works:
exercise.repetitions.push Repetition.new
This brakes with the following exception.
exercise.repetitions.push ParticularRepetition.new ArgumentError: wrong number of arguments (1 for 0) from ............mongoid-4.0.0.beta1/lib/mongoid/fields.rb:477:in `block (2 levels) in create_field_check'
Am a doing something wrong or is a possible bug?