app/controllers/home_controller.rb
# Use time from value or fall back to Time.now
Use time from value or fall back to Time.now
Use time from value or fall back to Time . now
def time_now_or_param(params_time_now)
    if params_time_now.present?
      Time.at(params_time_now.to_i)
    else
      Time.now
    end
  end
def time_now_or_param ( params_time_now ) if params_time_now . present? Time . at ( params_time_now . to_i ) else Time . now end end
Use time from value or fall back to Time.now
Use time from value or fall back to Time . now
params_time_now
<not_specific>