2

So I have 404.html in my public folder. And I have controller with something like

def show
  @info = Info.find_by_id params[:id]
  render :file => 'public/404.html', :status => 404 if @info.nil?
end

But this render :file => 'public/404.html', :status => 404 seems rather unclean. Is there better way? Something like raise Error::404

Ximik
  • 2,435
  • 3
  • 27
  • 53

0 Answers0