BUGFIX: attribute protection

Fixes bug where documents recreated from the database were
being stripped of their protected attributes when instantiated

Signed-off-by: Marcos Tapajos <tapajos@Tapajos-MacBook.local>
This commit is contained in:
Will Leinweber 2009-12-04 01:58:07 -06:00
parent 5707d89290
commit d41c7c96da
5 changed files with 84 additions and 17 deletions

View file

@ -183,7 +183,7 @@ module CouchRest
if @container_class.nil?
results
else
results['rows'].collect { |row| @container_class.new(row['doc']) } unless results['rows'].nil?
results['rows'].collect { |row| @container_class.create_from_database(row['doc']) } unless results['rows'].nil?
end
end