Class: Hist::PendingsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/hist/pendings_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#diff_base

Instance Method Details

#diffObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'app/controllers/hist/pendings_controller.rb', line 5

def diff
  obj_left, obj_right = diff_base(Hist::Pending)

  if obj_left.ver_id.nil?
    @right_title = "Current Version (#{Time.now.in_time_zone('Eastern Time (US & Canada)').strftime('%B %e, %Y at %I:%M %p')} EST)"
  else
    @right_title = "Submitted (Pending): #{obj_left.pending_id} (#{obj_left.created_at.in_time_zone('Eastern Time (US & Canada)').strftime('%B %e, %Y at %I:%M %p')} EST)"
  end

  if obj_right.ver_id.nil?
    @left_title = "Current Version (#{Time.now.in_time_zone('Eastern Time (US & Canada)').strftime('%B %e, %Y at %I:%M %p')} EST)"
  else
    @left_title = "Submitted (Pending): #{obj_right.pending_id} (#{obj_right.in_time_zone('Eastern Time (US & Canada)').strftime('%B %e, %Y at %I:%M %p')} EST)"
  end
end