Sha256: ad1ff38090742055a73811863b6bd9d937d98b1fbb9a6c3d5e42cf0c7d23e774

Contents?: true

Size: 371 Bytes

Versions: 2

Compression:

Stored size: 371 Bytes

Contents

class Spina::PagesController < Spina::ApplicationController
  include Spina::Frontend

  before_action :current_spina_user_can_view_page?

  helper_method :page

  def homepage
    render_with_template(page)
  end

  private

    def current_spina_user_can_view_page?
      raise ActiveRecord::RecordNotFound unless current_spina_user.present? || page.live?
    end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spina-2.1.1 app/controllers/spina/pages_controller.rb
spina-2.1.0 app/controllers/spina/pages_controller.rb