Sha256: 32b96b505dc0cc429ae556b42a81a2586f153255ba47c5788f17b313a82d6278

Contents?: true

Size: 320 Bytes

Versions: 20

Compression:

Stored size: 320 Bytes

Contents

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

  before_action :authorize_page

  helper_method :page

  def homepage
    render_with_template(page)
  end
  
  private
  
    def authorize_page
      raise ActiveRecord::RecordNotFound unless page.live? || logged_in?
    end

end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
spina-2.12.0 app/controllers/spina/pages_controller.rb
spina-2.11.0 app/controllers/spina/pages_controller.rb
spina-2.10.0 app/controllers/spina/pages_controller.rb
spina-2.9.1 app/controllers/spina/pages_controller.rb
spina-2.9.0 app/controllers/spina/pages_controller.rb
spina-2.8.1 app/controllers/spina/pages_controller.rb
spina-2.8.0 app/controllers/spina/pages_controller.rb
spina-2.7.0 app/controllers/spina/pages_controller.rb
spina-2.6.2 app/controllers/spina/pages_controller.rb
spina-2.6.1 app/controllers/spina/pages_controller.rb
spina-2.6.0 app/controllers/spina/pages_controller.rb
spina-2.5.0 app/controllers/spina/pages_controller.rb
spina-2.4.0 app/controllers/spina/pages_controller.rb
spina-2.3.5 app/controllers/spina/pages_controller.rb
spina-2.3.4 app/controllers/spina/pages_controller.rb
spina-2.3.3 app/controllers/spina/pages_controller.rb
spina-2.3.2 app/controllers/spina/pages_controller.rb
spina-2.3.1 app/controllers/spina/pages_controller.rb
spina-2.3.0 app/controllers/spina/pages_controller.rb
spina-2.2.0 app/controllers/spina/pages_controller.rb