blueprinter icon indicating copy to clipboard operation
blueprinter copied to clipboard

Error when use alias for fields (or method) with ? at the end

Open Elsopuro opened this issue 4 years ago • 0 comments

class UserSerializer < Blueprinter::Base
  identifier :id

  view :default do
    fields :valid?
  end
end

This OK

class UserSerializer < Blueprinter::Base
  identifier :id

  view :default do
    fields :valid?,  name: :isValid
  end
end

ArgumentError (comparison of Symbol with Hash failed)

Now i use alias in the model, but would not like alias isValid valid?

Elsopuro avatar Jan 19 '22 11:01 Elsopuro