-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Labels
Description
grape-rabl 0.5.0 uses Grape::Formatter.formatter_for with one argument.
grape-rabl/lib/grape-rabl/formatter.rb
Lines 40 to 41 in b201ebd
| def fallback_formatter | |
| Grape::Formatter.formatter_for(env[Grape::Env::API_FORMAT]) |
But grape 2.2.0 changed its arity.
So wrong number of arguments (given 1, expected 2) raised.
In our application, following monkey patch resolved the exception.
module Grape
module Formatter
module_function
def formatter_for(api_format, formatters=nil)
select_formatter(formatters, api_format) || DEFAULT_LAMBDA_FORMATTER
end
end
enddiei