Sha256: 9f614d60f2c2205e2e47455c5000702b03da22792041c769b92e3de36f4458e0

Contents?: true

Size: 652 Bytes

Versions: 5

Compression:

Stored size: 652 Bytes

Contents

module RocketJobMissionControl
  module ApplicationHelper
    def site_title
      'Rocket Job Mission Control'
    end

    def title
      @page_title ||= params[:controller].to_s.titleize
      h(@full_title || [@page_title, site_title].compact.join(' | '))
    end

    def active_page(path)
      'active' if current_page?(path)
    end

    def pretty_print_array_or_hash(arguments)
      return arguments unless arguments.kind_of?(Array) || arguments.kind_of?(Hash)
      json_string_options = { space: ' ', indent: '  ', array_nl: '<br />', object_nl: '<br />' }
      JSON.generate(arguments, json_string_options).html_safe
    end

  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rocketjob_mission_control-1.2.4 app/helpers/rocket_job_mission_control/application_helper.rb
rocketjob_mission_control-1.2.3 app/helpers/rocket_job_mission_control/application_helper.rb
rocketjob_mission_control-1.2.2 app/helpers/rocket_job_mission_control/application_helper.rb
rocketjob_mission_control-1.2.1 app/helpers/rocket_job_mission_control/application_helper.rb
rocketjob_mission_control-1.2.0 app/helpers/rocket_job_mission_control/application_helper.rb