On Jun 16, 2011, at 5:53 PM, Mauro wrote:
On Jun 16, 2011, at 5:32 PM, Mauro wrote:
before_validation(:on => :create) do
default_scope :order => ‘practice_number ASC’
It’s the same, same error.
spawned them. But count is a property of a collection of unique
So the undefined method count rised by the model is correct?
How about a method to assign a progressive number to
Yes, it’s apparently mixed into the controller, so you would have to
do that there. I could see you adding this to the create method
directly, or you could put it in a before_save there, it should work
fine. Probably exactly the same code as your initial example.