Skip to content
Browse files

minor

  • Loading branch information...
1 parent f9c1629 commit f945b2735508c47ef6675e85ec3e0b30deeab282 @HugoLnx committed Sep 27, 2011
View
7 app/controllers/application_controller.rb
@@ -25,4 +25,11 @@ def compress_with_gzip
response.body = ActiveSupport::Gzip.compress response.body
response.headers["Content-Encoding"] = "gzip"
end
+
+ def prepare_for_layout
+ @tagged_posts = Infrastructure::PostsDateTagger.to_hash Post.find_all(:location => PostsController::LOCATION)
+ @comunidade_posts = Post.find_all(:location => 'comunidade')
+ @sobre_mim_posts = Post.find_all(:location => 'sobre-mim')
+ @meu_codigo_posts = Post.find_all(:location => 'meu-codigo')
+ end
end
View
2 app/controllers/errors_controller.rb
@@ -1,5 +1,5 @@
# encoding: utf-8
-class ErrorsController < PostsBaseController
+class ErrorsController < ApplicationController
def show
prepare_for_layout
error_message = params[:message]
View
7 app/controllers/posts_base_controller.rb
@@ -5,11 +5,4 @@ def prepare_to_render_show_with(post)
@comment = Comment.new
prepare_for_layout
end
-
- def prepare_for_layout
- @tagged_posts = Infrastructure::PostsDateTagger.to_hash Post.find_all(:location => PostsController::LOCATION)
- @comunidade_posts = Post.find_all(:location => 'comunidade')
- @sobre_mim_posts = Post.find_all(:location => 'sobre-mim')
- @meu_codigo_posts = Post.find_all(:location => 'meu-codigo')
- end
end
View
1 app/controllers/posts_controller.rb
@@ -20,7 +20,6 @@ def redirect_to_right_path
def show
friendly_id = params[:id]
@post = Post.find(:friendly_id => friendly_id, :location => LOCATION)
-
prepare_to_render_show_with @post
@pagehead = PageHead.new :keywords => @post.keywords.join(','),

0 comments on commit f945b27

Please sign in to comment.
Something went wrong with that request. Please try again.