Commit 43805c54517292f801315214acb125e0adab6cec
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
fix conflit
Showing
2 changed files
with
4 additions
and
2 deletions
Show diff stats
lib/noosfero/api/helpers.rb
... | ... | @@ -55,7 +55,7 @@ require 'grape' |
55 | 55 | end |
56 | 56 | def multiple_search?(searches=nil) |
57 | 57 | ['index', 'category_index'].include?(params[:action]) || (searches && searches.size > 1) |
58 | - end | |
58 | + end | |
59 | 59 | #################################################################### |
60 | 60 | |
61 | 61 | def logger |
... | ... | @@ -299,8 +299,10 @@ require 'grape' |
299 | 299 | end |
300 | 300 | |
301 | 301 | def render_api_errors!(messages) |
302 | + messages = messages.to_a if messages.class == ActiveModel::Errors | |
302 | 303 | render_api_error!(messages.join(','), 400) |
303 | 304 | end |
305 | + | |
304 | 306 | protected |
305 | 307 | |
306 | 308 | def set_session_cookie | ... | ... |
plugins/juventude