Hobo Fields hides some active model serializers.

Skip to first unread message

Donald Ziesig

Aug 26, 2016, 6:06:03 PM8/26/16
to Hobo Users
Hi All!

It's been a long time, but I'm back :-D.

I am currently working on a Single Page App using Rails 5 in api mode.
I don't need a lot of the Hobo goodies (e.g. dryml), but I really would
like to use Hobo Fields in my models.

Unfortunately, when I include gem 'hobo_fields' in Gemfile, my rspec
tests all fail with undefined constants. HashSerializer,
ObjectSerializer and BasicObjectSerializer are all missing (hidden?). I
was able to implement HashSerializer and ObjectSerializer myself, but
ObjectSerializer brought in BasicObjectSerializer and I couldn't find an
appropriate interface for it.

The error tracebacks all showed that hobo_support was at the top of the
stack as in:

Failure/Error: render json: { errors: user.errors }, status: 422

uninitialized constant BasicObjectSerializer

I removed hobo_fields from my gemfile and all of the tests passed.

Just in case it may be significant, the failures were all associated
with the errors field of the failing model objects. The models
themselves serialized fine.

One of the failing lines is:

render json: { errors: user.errors }, status: 422

Are there any suggested fixes for this?


Don Ziesig

Reply all
Reply to author
0 new messages