lib/pg_serializable.rb in pg_serializable-1.2.1 vs lib/pg_serializable.rb in pg_serializable-1.2.2

- old
+ new

@@ -35,10 +35,13 @@ to_pg_json accept(PgSerializable::Visitors::Json.new, trait: trait) end def serializable(&blk) trait_manager.instance_eval &blk - validate_traits! + begin + validate_traits! + rescue ActiveRecord::NoDatabaseError + end end def trait_manager @trait_manager ||= TraitManager.new(self) end