Páginas dinâmicas de erro em Rails com Goalie Helder Ribeiro
 
 
 
 
public/400.html public/500.html public/400.pt-BR.html public/500.pt-BR.html
Conteúdo dinâmico?
 
$ gem install goalie # config/application.rb require 'goalie/rails' Seus problemas se acabaram!
# goalie/rails module Goalie class Engine < Rails::Engine initializer &quot;goalie.add_middleware&quot; do |app| app.middl...
app/views/public_errors/forbidden.html .erb app/views/public_errors/not_found.html .erb … app/views/local_errors/
class PublicErrorsController  < ApplicationController end
class PublicErrorsController < ApplicationController # 404 def not_found @posts = Post.find_latest end end
 
github.com/obvio171/goalie (MIT license) @obvio171 [email_address]
Upcoming SlideShare
Loading in …5
×

Páginas Dinâmicas de Erro em Rails com Goalie

1,297 views
1,239 views

Published on

Palestra rápida apresentando o Goalie, um plugin Rails baseado em Engines e Rack para

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,297
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
5
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Páginas Dinâmicas de Erro em Rails com Goalie

  1. 1. Páginas dinâmicas de erro em Rails com Goalie Helder Ribeiro
  2. 6. public/400.html public/500.html public/400.pt-BR.html public/500.pt-BR.html
  3. 7. Conteúdo dinâmico?
  4. 9. $ gem install goalie # config/application.rb require 'goalie/rails' Seus problemas se acabaram!
  5. 10. # goalie/rails module Goalie class Engine < Rails::Engine initializer &quot;goalie.add_middleware&quot; do |app| app.middleware.delete 'ShowExceptions' app.middleware.use Goalie::CustomErrorPages end end end
  6. 11. app/views/public_errors/forbidden.html .erb app/views/public_errors/not_found.html .erb … app/views/local_errors/
  7. 12. class PublicErrorsController < ApplicationController end
  8. 13. class PublicErrorsController < ApplicationController # 404 def not_found @posts = Post.find_latest end end
  9. 15. github.com/obvio171/goalie (MIT license) @obvio171 [email_address]

×