diff --git a/lib/pairwise/question.rb b/lib/pairwise/question.rb index 5f9a5bf..7b214ae 100644 --- a/lib/pairwise/question.rb +++ b/lib/pairwise/question.rb @@ -17,25 +17,23 @@ class Pairwise::Question < ActiveResource::Base end def pending_choices(filter=nil, order=nil) - find_options = { - :question_id => self.id, - :include_inactive => true, - :inactive_ignore_flagged => 1, - :filter => filter, - :order => order - } + find_options = {} + find_options[:question_id] = self.id + find_options[:include_inactive] = true + find_options[:inactive_ignore_flagged] = 1 + find_options[:filter] = filter unless filter.nil? + find_options[:order] = order Pairwise::Choice.find(:all, :params => find_options) end def reproved_choices(filter=nil, order=nil) - find_options = { - :question_id => self.id, - :include_inactive => true, - :reproved => 1, - :filter => filter, - :order => order - } + find_options = {} + find_options[:question_id] = self.id + find_options[:include_inactive] = true + find_options[:reproved] = 1 + find_options[:filter] = filter unless filter.nil? + find_options[:order] = order Pairwise::Choice.find(:all, :params => find_options) end diff --git a/lib/pairwise_plugin/helpers/viewer_helper.rb b/lib/pairwise_plugin/helpers/viewer_helper.rb index 1847b31..aafd292 100644 --- a/lib/pairwise_plugin/helpers/viewer_helper.rb +++ b/lib/pairwise_plugin/helpers/viewer_helper.rb @@ -9,7 +9,7 @@ module PairwisePlugin::Helpers::ViewerHelper link_target.merge!(:source => source) if source loading_javascript = pairwise_spinner_show_function_call(pairwise_content) + pairwise_hide_skip_call(pairwise_content) - content_tag(:div, prompt.send("#{direction}_choice_text"), :class => 'choice-text') + + content_tag(:div, prompt.send("#{direction}_choice_text").html_safe, :class => 'choice-text') + link_to_remote(_('Vote'), :loading => loading_javascript, :url => link_target, :html => {:class => 'vote-link'}) end diff --git a/views/content_viewer/_prompt_body.html.erb b/views/content_viewer/_prompt_body.html.erb index c68af46..324b598 100644 --- a/views/content_viewer/_prompt_body.html.erb +++ b/views/content_viewer/_prompt_body.html.erb @@ -5,13 +5,13 @@ <% if pairwise_content.in_group? %>