Sha256: ba597e9dd0748ce419857937105f7b58e1f938623e39dbc02f54c624915e8e2b
Contents?: true
Size: 877 Bytes
Versions: 4
Compression:
Stored size: 877 Bytes
Contents
# frozen_string_literal: true module LogsExplorer module ApplicationHelper def icon(name) # https://www.iconfinder.com/iconsets/vivid raw File.read(File.expand_path(File.dirname(__FILE__) + "/../../assets/images/#{name}.svg")) end def insert_css_file(file) raw "<style>#{raw File.read File.expand_path(File.dirname(__FILE__) + "/../../views/logs_explorer/stylesheets/#{file}")}</style>" end def insert_js_file(file) raw "<script>#{raw File.read File.expand_path(File.dirname(__FILE__) + "/../../views/logs_explorer/javascripts/#{file}")}</script>" end def format_datetime(e) e.strftime("%Y-%m-%d %H:%M:%S") end def active?(section) case section when :dashboard "is-active" if controller_name == "home" && action_name == "index" end end end end
Version data entries
4 entries across 4 versions & 1 rubygems