diff --git a/app/controllers/posts_controller.rb b/app/controllers/posts_controller.rb index 8c47c49f..2ab11524 100644 --- a/app/controllers/posts_controller.rb +++ b/app/controllers/posts_controller.rb @@ -15,7 +15,7 @@ class PostsController < ApplicationController @posts.sort_by!(:order, :date).reverse! @usuarie = @site.usuarie? current_usuarie - fresh_when @posts + fresh_when @site end def show @@ -40,6 +40,8 @@ class PostsController < ApplicationController params: params) if (@post = service.create.persisted?) + @site.touch + redirect_to site_posts_path(@site) else render 'posts/new' @@ -65,6 +67,8 @@ class PostsController < ApplicationController params: params) if service.update.persisted? + @site.touch + redirect_to site_posts_path(@site) else render 'posts/edit' @@ -85,6 +89,7 @@ class PostsController < ApplicationController # TODO: Notificar si se pudo o no service.destroy + @site.touch redirect_to site_posts_path(@site) end @@ -98,6 +103,7 @@ class PostsController < ApplicationController params: params) service.reorder + @site.touch redirect_to site_posts_path(@site) end