Sha256: 036d108ac55e25a8e24c4138ac0e28504b7f33854bb22786364df89b813233f9
Contents?: true
Size: 571 Bytes
Versions: 10
Compression:
Stored size: 571 Bytes
Contents
module Jabe class EntriesController < ApplicationController include ApplicationHelper helper_method :entry, :comment def index @entries = Entry.published. page(params[:page]). per( Jabe::SETTINGS.entries_per_page || 5) end def show if entry.draft? && ! admin_signed_in? render 'public/404.html', :layout => false, :status => 404 end end private def entry @entry ||= Entry.find(params[:id]) end def comment @comment ||= entry.comments.new end end end
Version data entries
10 entries across 10 versions & 1 rubygems