Sha256: 36099120c43bb47ca8e766d166191e4890f7f7e1c5f22a3dd48fc35462c22fa1
Contents?: true
Size: 606 Bytes
Versions: 8
Compression:
Stored size: 606 Bytes
Contents
# Filters added to this controller apply to all controllers in the application. # Likewise, all the methods added will be available for all controllers. class ApplicationController < ActionController::Base protect_from_forgery layout 'application' helper_method :site helper_method :latests helper :squeezer_helper def latests Blog.paginate :page =>1,:per_page=>5, :order => 'created_at DESC' end def site return Site.last end rescue_from CanCan::AccessDenied do |exception| flash[:error] = "Acceso no permitido!" redirect_to root_url end end
Version data entries
8 entries across 8 versions & 1 rubygems