Class: ArchiveController

Inherits:
ApplicationController show all
Defined in:
app/controllers/archive_controller.rb

Instance Method Summary collapse

Instance Method Details

#dayObject


4
5
6
7
8
# File 'app/controllers/archive_controller.rb', line 4

def day
  @date = Date.new(params[:year].to_i, params[:month].to_i, params[:day].to_i)

  @posts = Post.includes(:blog).created_between(@date.beginning_of_day, @date.end_of_day).recent
end

#indexObject


2
# File 'app/controllers/archive_controller.rb', line 2

def index; end