I want to programmatically under certain conditions return a 404 (page not found) error to the browser. How can I do this from my controller? I''m assuming I need to set a header on the reponse obect. However I can''t figure out what the header name is. thanks, scott. -- Posted via http://www.ruby-forum.com/.
Greetings Scott
Yep, you''re right
response.headers["Status"] = "404"
cheers,
Jodi
On 2-Apr-06, at 10:33 PM, Scott F. Walter wrote:
> I want to programmatically under certain conditions return a 404 (page
> not found) error to the browser. How can I do this from my
> controller?
>
> I''m assuming I need to set a header on the reponse obect. However
I
> can''t figure out what the header name is.
>
> thanks, scott.
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
Is something preventing... render :nothing => true, :status => 404 ...from being apropos? On 4/2/06, Scott F. Walter <tx_scottwalter@yahoo.com> wrote:> I want to programmatically under certain conditions return a 404 (page > not found) error to the browser. How can I do this from my controller? > > I''m assuming I need to set a header on the reponse obect. However I > can''t figure out what the header name is. > > thanks, scott. > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >