blueprinter
blueprinter copied to clipboard
Error when use alias for fields (or method) with ? at the end
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?