Sha256: 2ffe0eda16cb302fe75965221d75fdeccea54842bd7bc87365fb194225ea8c13
Contents?: true
Size: 464 Bytes
Versions: 42
Compression:
Stored size: 464 Bytes
Contents
module Virgo module AdminHelper # because pages and posts are actually both "Post" records, we need # to use a couple hints to establish whether we're on # a posts page or a pages page def pages_action? params[:filters][:post_type] == 'page' || @post && @post.page? end def posts_action? (params[:filters][:post_type].blank? || params[:filters][:post_type] == 'post') && (@post.nil? || @post.post?) end end end
Version data entries
42 entries across 42 versions & 1 rubygems