Commit 742a886d0ccd47bf863bf797bfbd55b77b1c32d7
1 parent
247e46d3
Exists in
fix_sign_up_form
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,7 +211,7 @@ module Api | ||
211 | else | 211 | else |
212 | field_name, direction = params[:order].split(' ') | 212 | field_name, direction = params[:order].split(' ') |
213 | assoc_class = extract_associated_classname(method_or_relation) | 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 | if assoc_class.attribute_names.include? field_name | 215 | if assoc_class.attribute_names.include? field_name |
216 | if direction.present? and ['ASC','DESC'].include? direction.upcase | 216 | if direction.present? and ['ASC','DESC'].include? direction.upcase |
217 | order = "#{field_name} #{direction.upcase}" | 217 | order = "#{field_name} #{direction.upcase}" |