Class: Theblog::HomeController

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

Instance Method Summary collapse

Methods inherited from ApplicationController

#path_to_content_node

Instance Method Details

#indexObject



3
4
5
6
7
8
# File 'app/controllers/theblog/home_controller.rb', line 3

def index
  @node = Page.published.find_by(slug: 'home')
  @node ||= Page.published.first

  @posts = Post.published.page params[:page]
end