Permalink
Browse files

Instancia en historial opcional al referenciar página CRUD de modelo

  • Loading branch information...
1 parent 8aebe54 commit 7f0c9bcd352921947f333e5d2eb10aa91f9e555c @nando committed Apr 19, 2010
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/mundo_pepino/es_ES/mappings.rb
@@ -84,7 +84,9 @@ def language_specific_mappings
end
else
model = modelo.to_unquoted.to_model or raise(MundoPepino::ModelNotMapped.new(modelo))
- MundoPepino.world.pile_up model.new
+ if dummy_instance = model.new rescue nil
+ MundoPepino.world.pile_up dummy_instance
+ end
MundoPepino.world.send "#{action}_#{model.name.underscore}_path"
end
},

0 comments on commit 7f0c9bc

Please sign in to comment.