From 80ad0537a88a7d6626d27d868428ddb3c16ed5b6 Mon Sep 17 00:00:00 2001 From: Nicolas Bally Date: Mon, 8 Sep 2014 14:44:22 +0200 Subject: [PATCH] articles 1er du mois --- app/controllers/public/articles_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/public/articles_controller.rb b/app/controllers/public/articles_controller.rb index 0749aa2..34244c1 100644 --- a/app/controllers/public/articles_controller.rb +++ b/app/controllers/public/articles_controller.rb @@ -65,7 +65,7 @@ class Public::ArticlesController < ApplicationController def archives @month = Date.parse("#{params[:year]}/#{params[:month]}").beginning_of_month - @articles = Article.recents.where("enabled = ? and published_at > ? and published_at < ?", true, @month, @month.end_of_month ).before(Date.today) + @articles = Article.recents.where("enabled = ? and published_at >= ? and published_at <= ?", true, @month, @month.end_of_month ).before(Date.today) @articles = @articles.page(params[:page]).per(10) @title = "Articles du blog" if [4,8].include?(@month.month)