Class: PostDigestsController

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

Instance Method Summary collapse

Instance Method Details

#showObject

Raises:

  • (ActiveRecord::RecordNotFound)

2
3
4
5
6
7
# File 'app/controllers/post_digests_controller.rb', line 2

def show
  @post_digest = PostDigest.find_by slug: params[:slug]
  raise ActiveRecord::RecordNotFound if @post_digest.blank?

  @posts = @post_digest.posts.order('created_at DESC')
end