Commit c185e680396f409fa1621a66ce9b53237254df0c
1 parent
05580ed2
Exists in
master
Fix for rails4
Showing
4 changed files
with
6 additions
and
4 deletions
Show diff stats
Gemfile
controllers/profile/pairwise_plugin_suggestions_controller.rb
@@ -11,7 +11,7 @@ class PairwisePluginSuggestionsController < ProfileController | @@ -11,7 +11,7 @@ class PairwisePluginSuggestionsController < ProfileController | ||
11 | return no_result if @pairwise_content.question.nil? | 11 | return no_result if @pairwise_content.question.nil? |
12 | @choices = list_choices | 12 | @choices = list_choices |
13 | @choices = WillPaginate::Collection.create(params[:page] || 1, 20, @choices.length) do |pager| | 13 | @choices = WillPaginate::Collection.create(params[:page] || 1, 20, @choices.length) do |pager| |
14 | - pager.replace(@choices.slice(pager.offset, pager.per_page)) | 14 | + pager.replace(@choices.to_a.slice(pager.offset, pager.per_page)) |
15 | end | 15 | end |
16 | end | 16 | end |
17 | 17 |
views/pairwise_plugin_profile/_suggestion_form.html.erb
1 | - <%= remote_form_for('idea', :url => pairwise_suggestion_url(pairwise_content, embeded, source), | 1 | + <%= remote_form_for(pairwise_content, :url => pairwise_suggestion_url(pairwise_content, embeded, source), |
2 | :html => {:id => "pairwise_suggestion_form_#{pairwise_content.id}"}, :loading => "jQuery('#pairwise_suggestion_form_#{pairwise_content.id} .suggestion_box_fields').hide();jQuery('#pairwise_suggestion_form_#{pairwise_content.id} .suggestion_box_loading').show();", :loaded => "jQuery('#pairwise_suggestion_form_#{pairwise_content.id} .suggestion_box_fields').show();jQuery('#pairwise_suggestion_form_#{pairwise_content.id} .suggestion_box_loading').hide();") do |f| %> | 2 | :html => {:id => "pairwise_suggestion_form_#{pairwise_content.id}"}, :loading => "jQuery('#pairwise_suggestion_form_#{pairwise_content.id} .suggestion_box_fields').hide();jQuery('#pairwise_suggestion_form_#{pairwise_content.id} .suggestion_box_loading').show();", :loaded => "jQuery('#pairwise_suggestion_form_#{pairwise_content.id} .suggestion_box_fields').show();jQuery('#pairwise_suggestion_form_#{pairwise_content.id} .suggestion_box_loading').hide();") do |f| %> |
3 | <div class="suggestion_box_fields"> | 3 | <div class="suggestion_box_fields"> |
4 | <div class="error"> | 4 | <div class="error"> |
@@ -7,10 +7,10 @@ | @@ -7,10 +7,10 @@ | ||
7 | <div class="notice"> | 7 | <div class="notice"> |
8 | <%= flash[:notice] %> | 8 | <%= flash[:notice] %> |
9 | </div> | 9 | </div> |
10 | - <div class="div_text_input_container"> | 10 | + <div class="div_text_input_container"> |
11 | <div id="text_idea_content_<%= pairwise_content.id %>" class="div_text_input"> | 11 | <div id="text_idea_content_<%= pairwise_content.id %>" class="div_text_input"> |
12 | <%= text_area :idea, :text, :maxlenght => 160, :rows => 4, :placeholder => _('Type your idea here') %> | 12 | <%= text_area :idea, :text, :maxlenght => 160, :rows => 4, :placeholder => _('Type your idea here') %> |
13 | - </div> | 13 | + </div> |
14 | <div class="suggest_idea_btn"> | 14 | <div class="suggest_idea_btn"> |
15 | <%= submit_button('', _("Send"), :id => 'new_idea_button', :class => user ? '':'require-login-popup') %> | 15 | <%= submit_button('', _("Send"), :id => 'new_idea_button', :class => user ? '':'require-login-popup') %> |
16 | </div> | 16 | </div> |
@@ -0,0 +1 @@ | @@ -0,0 +1 @@ | ||
1 | +<%= _('No Result') %> |