You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've placed a binding.pry there (at lib/representable/serializer.rb:6), and getting next results:
# When name field is being processed the getter is a method of OpenStruct contained it:
options[:binding].getter
=> "name"
options[:binding].send(:exec_context, options)
=> #<OpenStruct name="name", description="description", format="string", position=0, parent_id=nil>
[2] pry(Representable)> method = options[:binding].send(:exec_context, options).method(options[:binding].getter)
=> #<Method: OpenStruct#name>
# But when format field is being processed one thing get different: method isn't from this OpenStruct:
options[:binding].getter
=> "format"
method = options[:binding].send(:exec_context, options).method(options[:binding].getter)
=> #<Method: OpenStruct(Kernel)#format>
# And…
method = options[:binding].send(:exec_context, options).send(options[:binding].getter)
too few arguments
My app is failing there with
too few arguments
exception raised from representable (I don't use representable directly): https://github.com/apotonick/representable/blob/830f2ceb7feddef1f181952d878f22623c4a431b/lib/representable/serializer.rb#L6I have a Trailblazer enabled Rails application with next Contract in it:
Which is used in operation:
And model:
I've placed a
binding.pry
there (atlib/representable/serializer.rb:6
), and getting next results:Stacktrace:
Received params:
Gemfile:
Any thoughts how to debug and fix this?
The text was updated successfully, but these errors were encountered: