Module: HyperKittenMeow::Concerns::Controllers::PostsController

Extended by:
ActiveSupport::Concern
Included in:
PostsController
Defined in:
lib/hyper_kitten_meow/concerns/controllers/posts_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



7
8
9
# File 'lib/hyper_kitten_meow/concerns/controllers/posts_controller.rb', line 7

def index
  @pagy, @posts = pagy(Post.published.sorted_by_published_date)
end

#showObject



11
12
13
# File 'lib/hyper_kitten_meow/concerns/controllers/posts_controller.rb', line 11

def show
  @post = Post.published.find_by_slug!(params[:id])
end