module Caboose module ApplicationHelper def caboose_tinymce return " \n" end def parent_categories Caboose::Category.find(1).children.where(:status => 'Active') end def forem_user return @logged_in_user end def gzip_javascript_include_tag(asset) tag = javascript_include_tag asset tag = tag.gsub(/\.js/i, ".js.gz") if Rails.env.production? && request.accept_encoding =~ /gzip/i #tag = tag.gsub(/\.js/i, ".js.gz") if request.accept_encoding =~ /gzip/i tag.html_safe end def gzip_stylesheet_link_tag(asset) tag = stylesheet_link_tag asset, media: "all" tag = tag.gsub(/\.css/i, ".css.gz") if Rails.env.production? && request.accept_encoding =~ /gzip/i #tag = tag.gsub(/\.css/i, ".css.gz") if request.accept_encoding =~ /gzip/i tag.html_safe end def cloudfront_asset_path(path) str = asset_path(str) str = str.gsub('http://', 'https://') if request.env['HTTPS'] == 'on' return str end end end