Sha256: ac738f1da691ff0fe0542fa6a6749c1e9cf50e5cb492381a75808e306afd60ac
Contents?: true
Size: 511 Bytes
Versions: 10
Compression:
Stored size: 511 Bytes
Contents
class EntriesController < ApplicationController helper_method :entry, :comment def index @entries = Entry.published.paginate( :page => (params[:page] || 1), :per_page => (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
Version data entries
10 entries across 10 versions & 1 rubygems