From: Hassan Schroeder Date: 2012-10-27T03:32:26+09:00 Subject: Re: Googlebot- How to generate a 404 error status after a if statement On Fri, Oct 26, 2012 at 9:41 AM, Pierre d. wrote: > Could you help me implement this correctly in the controller? Do I have > to call a special page in the controller? def whatever if params[:good] == 'yes' render :good_result and return else response.status= 404 render :bad_result and return end end > if yes how do I execute this page, what should I write in the rhtml > statement? Since you have 2 separate view files, good_result.html.erb and bad_result.html.erb, you can put whatever's appropriate in them. Keep logic out of your views as much as possible. -- Hassan Schroeder ------------------------ hassan.schroeder@gmail.com http://about.me/hassanschroeder twitter: @hassan