articles 1er du mois
This commit is contained in:
parent
39dbb15127
commit
80ad0537a8
@ -65,7 +65,7 @@ class Public::ArticlesController < ApplicationController
|
|||||||
|
|
||||||
def archives
|
def archives
|
||||||
@month = Date.parse("#{params[:year]}/#{params[:month]}").beginning_of_month
|
@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)
|
@articles = @articles.page(params[:page]).per(10)
|
||||||
@title = "Articles du blog"
|
@title = "Articles du blog"
|
||||||
if [4,8].include?(@month.month)
|
if [4,8].include?(@month.month)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user