if
render '/404.html'
return
end
Quoting Legato :
> I can't raise ActiveRecord::NotFound as that's not the ORM I am using,
> so it is not even require'd in my project. Rendering 404.html should
> work, but how do I halt the action additionally? raising an Exception
> will prevent the rest o
I can't raise ActiveRecord::NotFound as that's not the ORM I am using,
so it is not even require'd in my project. Rendering 404.html should
work, but how do I halt the action additionally? raising an Exception
will prevent the rest of the action from executing, but rendering
won't afaik.
On Jun
Try "raise ActiveRecord::NotFound" or "render '/404.html'".
Jeffrey
Quoting Legato :
> What does one do when he's not using ActiveRecord? (Sequel here.)
>
> On Jun 1, 10:02 am, "Jeffrey L. Taylor" wrote:
> > Raising. In Rails 1.x and 2.x, ActiveRecord:NotFound exception is caught by
> > Rails
What does one do when he's not using ActiveRecord? (Sequel here.)
On Jun 1, 10:02 am, "Jeffrey L. Taylor" wrote:
> Raising. In Rails 1.x and 2.x, ActiveRecord:NotFound exception is caught by
> Rails and it displays the404page.
>
> HTH,
> Jeffrey
>
> Quoting Mirko :
>
> > Do you mean rescuing
Raising. In Rails 1.x and 2.x, ActiveRecord:NotFound exception is caught by
Rails and it displays the 404 page.
HTH,
Jeffrey
Quoting Mirko :
> Do you mean rescuing or raising ActiveRecord::NotFound?
>
> On Jun 1, 4:54 am, "Jeffrey L. Taylor" wrote:
> > Quoting Joshua Partogi :
> >
> > > Hi a
Hi Jeff and Mirko,
Thank you very much for the response.
By default active_record will raise ActiveRecord::NotFound exception
when a record can not be found in the database. And when this occurs,
it will display the 404 page from the public folder. Unfortunately
this hasn't been working for me in
Do you mean rescuing or raising ActiveRecord::NotFound?
On Jun 1, 4:54 am, "Jeffrey L. Taylor" wrote:
> Quoting Joshua Partogi :
>
> > Hi all,
>
> > I want to be able to display 404 page from a controller when a record
> > in the database can not be found. I am using Rails 3 at the moment. I
> >
7 matches
Mail list logo