Commit abdeb4a14daba7fbf97a444bd2b2dc825a926016
1 parent
b5297b8b
Exists in
master
adapt to rails 4
Showing
2 changed files
with
6 additions
and
7 deletions
Show diff stats
lib/pairwise/question.rb
... | ... | @@ -5,13 +5,11 @@ class Pairwise::Question < ActiveResource::Base |
5 | 5 | self.format = :xml |
6 | 6 | |
7 | 7 | def get_choices(filter=nil, order=nil) |
8 | - Pairwise::Choice.find( | |
9 | - :all, | |
10 | - :params => { | |
11 | - :question_id => self.id, | |
12 | - :filter => filter, | |
13 | - :order => order | |
14 | - }) | |
8 | + params = {} | |
9 | + params[:question_id] = self.id | |
10 | + params[:order] = order | |
11 | + params[:filter] = filter unless filter.nil? | |
12 | + Pairwise::Choice.find(:all, :params => params) | |
15 | 13 | end |
16 | 14 | |
17 | 15 | def choices_include_inactive | ... | ... |
lib/pairwise_plugin.rb