Sha256: e8a55ae5e8658e8488309d39f71ff5e62b76ce2f1804082c4886bf2a0cd8861a

Contents?: true

Size: 241 Bytes

Versions: 4

Compression:

Stored size: 241 Bytes

Contents

module Theblog
  class HomeController < Theblog::ApplicationController
    def index
      @node = Page.published.find_by(slug: 'home')
      @node ||= Page.published.first

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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
theblog-0.0.2.3 app/controllers/theblog/home_controller.rb
theblog-0.0.2.2 app/controllers/theblog/home_controller.rb
theblog-0.0.2.1 app/controllers/theblog/home_controller.rb
theblog-0.0.2 app/controllers/theblog/home_controller.rb