Sha256: c00756002a2a0a15ba4b28dce0dc723662a03cabf1083709c6f1e9315a6ed943
Contents?: true
Size: 1002 Bytes
Versions: 10
Compression:
Stored size: 1002 Bytes
Contents
module Spud::ApplicationHelper def tb_page_title if content_for?(:title) title = content_for(:title) + ' | ' + Spud::Core.site_name elsif @page_title title = @page_title + ' | ' + Spud::Core.site_name else title = Spud::Core.site_name end return content_tag :title, title end def current_site_name return Spud::Core.config.site_name end def cache_key_for_spud_collection(collection, key:'view', cache_params:[], for_user:false) cache_keys = [controller_name, action_name, key] cache_keys << collection.collect(&:updated_at).max().try(:utc).try(:to_i) if for_user cache_keys << current_user_id end if cache_params.any? cache_keys += cache_params.collect{ |cache_param| params[cache_param] || 'nil' } end cache_keys += collection.collect(&:id) cache_key = cache_keys.join('/') if cache_key.length > 250 return Digest::SHA1.hexdigest(cache_key) else return cache_key end end end
Version data entries
10 entries across 10 versions & 1 rubygems