Class: Jabe::EntriesController

Inherits:
ApplicationController show all
Includes:
ApplicationHelper
Defined in:
app/controllers/jabe/entries_controller.rb

Instance Method Summary collapse

Methods included from ApplicationHelper

#default_gravatar_url, #javascript, #page_title, #stylesheet

Methods included from PublicEntryUrl

included, #public_entry_url

Methods included from BodyClassHelper

#body_class_name, included

Instance Method Details

#indexObject



7
8
9
10
11
# File 'app/controllers/jabe/entries_controller.rb', line 7

def index
  @entries = Entry.published.
    page(params[:page]).
    per( Jabe::SETTINGS.entries_per_page || 5)
end

#showObject



13
14
15
16
17
# File 'app/controllers/jabe/entries_controller.rb', line 13

def show
  if entry.draft? && ! admin_signed_in?
    render 'public/404.html', :layout => false, :status => 404
  end
end