Commit 742a886d0ccd47bf863bf797bfbd55b77b1c32d7
1 parent
247e46d3
Exists in
staging
and in
9 other branches
fix variable name
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/api/helpers.rb
| ... | ... | @@ -211,7 +211,7 @@ module Api |
| 211 | 211 | else |
| 212 | 212 | field_name, direction = params[:order].split(' ') |
| 213 | 213 | assoc_class = extract_associated_classname(method_or_relation) |
| 214 | - if !field_name.blank? and assoc | |
| 214 | + if !field_name.blank? and assoc_class | |
| 215 | 215 | if assoc_class.attribute_names.include? field_name |
| 216 | 216 | if direction.present? and ['ASC','DESC'].include? direction.upcase |
| 217 | 217 | order = "#{field_name} #{direction.upcase}" | ... | ... |