Class: Podcasts::PodcastsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/podcasts/podcasts_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject


2
3
4
5
# File 'app/controllers/podcasts/podcasts_controller.rb', line 2

def index
  @episodes = Episode.includes(:podcast).order('created_at DESC').limit(12)
  @episodes = @episodes.older_than(Time.zone.at(params[:before].to_f)) if params[:before].present?
end