Module: DevTime::CurrentTimeHelper

Defined in:
app/helpers/dev_time/current_time_helper.rb

Instance Method Summary collapse

Instance Method Details

#dev_time_current_time_displayObject



11
12
13
14
15
16
17
18
19
20
# File 'app/helpers/dev_time/current_time_helper.rb', line 11

def dev_time_current_time_display
  if Rails.env.development? &&
     Delorean.send(:time_travel_offsets).any?
     :div, class: "dev-time-current-time" do
      "Time Travelling<br/>#{Time.now.strftime "%H:%M:%S %Y-%m-%d"}".html_safe
    end
  else
    ''
  end
end


3
4
5
6
7
8
9
# File 'app/helpers/dev_time/current_time_helper.rb', line 3

def dev_time_stylesheet_link_tag
  if Rails.env.development?
    stylesheet_link_tag 'dev_time/current_time'
  else
    ''
  end
end