From eb87519872152a16809a393cc970ba25f31ad6e6 Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Fri, 22 Apr 2016 11:17:32 -0300 Subject: [PATCH] Fix questions ordering in profile extension --- lib/ext/profile.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ext/profile.rb b/lib/ext/profile.rb index e883cdb..58b650d 100644 --- a/lib/ext/profile.rb +++ b/lib/ext/profile.rb @@ -1,5 +1,5 @@ require_dependency 'profile' Profile.class_eval do - has_many :questions, :source => 'articles', :class_name => 'PairwisePlugin::PairwiseContent', :order => 'start_date' -end \ No newline at end of file + has_many :questions, -> { order(:start_date) }, :source => 'articles', :class_name => 'PairwisePlugin::PairwiseContent' +end -- libgit2 0.21.2