Skip to content

Commit

Permalink
Using sort_by method instead of sort.
Browse files Browse the repository at this point in the history
  • Loading branch information
bhavik-patel12 committed Oct 25, 2017
1 parent 07db41d commit 35d34e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/response.rb
Expand Up @@ -62,7 +62,7 @@ def construct_review_response code,self_id
unless answers.empty?
questionnaire = self.questionnaire_by_answer(answers.first)
questionnaire_max = questionnaire.max_question_score
questions = questionnaire.questions.sort {|a, b| a.seq <=> b.seq }
questions = questionnaire.questions.sort_by{|a| a.seq}
code = add_table_rows questionnaire_max,questions,answers,code
end

Expand Down

0 comments on commit 35d34e7

Please sign in to comment.