rollback
This commit is contained in:
parent
c267a764b8
commit
031c8354f3
@ -64,8 +64,8 @@ class Public::ArticlesController < ApplicationController
|
||||
end
|
||||
|
||||
def archives
|
||||
@month = Date.parse("#{params[:year]}/#{params[:month]}").utc.beginning_of_month
|
||||
@articles = Article.recents.where("enabled = ? and published_at >= ? and published_at <= ?", true, @month, @month.utc.end_of_month ).before(Date.utc.today)
|
||||
@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 = @articles.page(params[:page]).per(10)
|
||||
@title = "Articles du blog"
|
||||
if [4,8].include?(@month.month)
|
||||
|
Loading…
x
Reference in New Issue
Block a user