Permalink
Browse files

@improve Always register the last model, in case it's change

  • Loading branch information...
1 parent 972bfe5 commit 0f0efa8f70db9a46c223032882ed6b7e6b82e050 @jeroig jeroig committed Jan 11, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/escargot.rb
View
@@ -10,7 +10,8 @@
module Escargot
def self.register_model(model)
@indexed_models ||= []
- @indexed_models << model if !@indexed_models.include?(model)
+ @indexed_models.delete(model) if @indexed_models.include?(model)
+ @indexed_models << model
end
def self.indexed_models

0 comments on commit 0f0efa8

Please sign in to comment.