Commit c185e680396f409fa1621a66ce9b53237254df0c

Authored by Victor Costa
1 parent 05580ed2
Exists in master

Fix for rails4

Gemfile
1 1 source 'https://rubygems.org'
2 2 gem 'vcr'
  3 +gem 'activeresource', require: 'active_resource'
3 4  
4 5 group :test do
5 6 gem 'webmock'
... ...
controllers/profile/pairwise_plugin_suggestions_controller.rb
... ... @@ -11,7 +11,7 @@ class PairwisePluginSuggestionsController < ProfileController
11 11 return no_result if @pairwise_content.question.nil?
12 12 @choices = list_choices
13 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 15 end
16 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 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 3 <div class="suggestion_box_fields">
4 4 <div class="error">
... ... @@ -7,10 +7,10 @@
7 7 <div class="notice">
8 8 <%= flash[:notice] %>
9 9 </div>
10   - <div class="div_text_input_container">
  10 + <div class="div_text_input_container">
11 11 <div id="text_idea_content_<%= pairwise_content.id %>" class="div_text_input">
12 12 <%= text_area :idea, :text, :maxlenght => 160, :rows => 4, :placeholder => _('Type your idea here') %>
13   - </div>
  13 + </div>
14 14 <div class="suggest_idea_btn">
15 15 <%= submit_button('', _("Send"), :id => 'new_idea_button', :class => user ? '':'require-login-popup') %>
16 16 </div>
... ...
views/pairwise_plugin_suggestions/no_result.html.erb 0 → 100644
... ... @@ -0,0 +1 @@
  1 +<%= _('No Result') %>
... ...