Ruby on Rails Tuesday, January 29, 2013

Okay, then you should set that up in your index method. Decide what you do want to show (maybe a partial with "How to Search" instructions) and show that instead of ModelName.all.

def index
if(params[:q])
#do your search thing
else
render :partial => 'search/instructions'
end
end

Walter

On Jan 29, 2013, at 12:50 PM, Ryo Saeba wrote:

> Thanks for responding?
>
> I watched a Kaminari Tutorial video on railscast and like what it does,
> I sure will use it too when I want my search results to be displayed in
> small pieces, but it is actually not what I was looking for.
>
> I'm not trying to have my results seperated in pages, but I want the
> entire "product"-list NOT to be displayed at all.
> The Index page should ONLY display filtered titles, but so far as
> default (when opening the index page) EVERY product is listed.
>
> I don't see Amazon oder IMDB having a page where every single product or
> Movie is listed...
>
> --
> Posted via http://www.ruby-forum.com/.
>
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
> To post to this group, send email to rubyonrails-talk@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment