Note that there are some explanatory texts on larger screens.

plurals
  1. POPagination in rails 3
    primarykey
    data
    text
    <p>In my rails application I need to display the matching tweets .lets say for example the matching results has 50 records, I need to display 10 records per page.I am getting the output which has all results but when I use pagination its showing link to different pages , but when I click the link to next page it says "string not matched". I tried different combinations like 5 per page ,but when I click the link to the next page it says "string not matched", but when I try without pagination it shows all the results</p> <p>My code for the controller</p> <pre><code>class TweetsController&lt;ApplicationController def index city = params[:show] search_term = params[:text] search_term[" "] = "%" @tweets = Tweets.where("tweet_text LIKE? ", "%#{search_term}%").paginate( page: params[:page], per_page: 3) </code></pre> <p>My code for the view</p> <pre><code>&lt;%= will_paginate @tweets %&gt; &lt;% @tweets.each do |tweets| %&gt; &lt;ul&gt; &lt;li&gt;&lt;%= tweets.id %&gt;&lt;/li&gt; &lt;li&gt;&lt;%= tweets.tweet_created_at %&gt;&lt;/li&gt; &lt;li&gt;&lt;%= tweets.tweet_source %&gt;&lt;/li&gt; &lt;li&gt;&lt;%= tweets.tweet_text %&gt;&lt;/li&gt; &lt;li&gt;&lt;%= tweets.user_id %&gt;&lt;/li&gt; &lt;li&gt;&lt;%= tweets.user_name %&gt;&lt;/li&gt; &lt;li&gt;&lt;%= tweets.user_sc_name %&gt;&lt;/li&gt; &lt;li&gt;&lt;%= tweets.user_loc %&gt;&lt;/li&gt; &lt;li&gt;&lt;%= tweets.user_img %&gt;&lt;/li&gt; &lt;li&gt;&lt;%= tweets.longitude %&gt;&lt;/li&gt; &lt;li&gt;&lt;%= tweets.latitude %&gt;&lt;/li&gt; &lt;li&gt;&lt;%= tweets.place %&gt;&lt;/li&gt; &lt;li&gt;&lt;%= tweets.country %&gt;&lt;/li&gt; &lt;% end %&gt; &lt;/ul&gt; </code></pre> <p>Anyone please help me with this</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload