lib/models/trip_leg.rb in fossil-0.3.31 vs lib/models/trip_leg.rb in fossil-0.3.32
- old
+ new
@@ -674,16 +674,16 @@
column_def_datetime :planned_arrival_date_time_local, :'arrival date - local', :'eta - local'
column_view :dept_date_act_home, :date, :actual_departure_date_base
column_view :depart_time_act_home, :time, :actual_departure_time_base
column_def_datetime :actual_departure_date_time_base_old, :'dept date act home', :'depart time act home'
- def actual_departure_date_time_base() actual_departure_date_time_gmt + (home_tz_gmt_offset/240); end
+ def actual_departure_date_time_base() actual_departure_date_time_gmt + (home_tz_gmt_offset/10).hours; end
column_view :arr_date_act_home, :date, :actual_arrival_date_base
column_view :arrival_time_act_hom, :time, :actual_arrival_time_base
column_def_datetime :actual_arrival_date_time_base_old, :'arr date act home', :'arrival time act hom'
- def actual_arrival_date_time_base() actual_arrival_date_time_gmt + (home_tz_gmt_offset/240); end
+ def actual_arrival_date_time_base() actual_arrival_date_time_gmt + (home_tz_gmt_offset/10).hours; end
column_view :ete, :time
column_view :eft, :time
column_view :flight_time_actual, :time, :aft_time
column_view :block_time_actual, :time, :abt_time
@@ -719,15 +719,14 @@
# This method guarantees an icao for a view that needs one. If there is an icao, use it, otherwise make
# it from the prefix and airport_id .. which works as an icao, but beware, because these put together
# icao's that you make are valid icao codes, but you can't search the airport based it, since these
# airport rows don't have an icao code at all, they only have the prefix and airport_id. whacky.
def departure_icao_val
- departure_icao.blank? ? depart_ap_prefix + depart_airport_id : ''
+ departure_icao == nil || departure_icao.blank? ? depart_ap_prefix + depart_airport_id : departure_icao
end
- # same comment as above
def arrival_icao_val
- arrival_icao.blank? ? arrival_ap_prefix + arrival_airport_id : ''
+ arrival_icao == nil || arrival_icao.blank? ? arrival_ap_prefix + arrival_airport_id : arrival_icao
end
def departure_icao_expanded
"#{departure_icao_val} #{departure_airport__name} #{departure_airport__city} ,#{departure_airport__state_abbreviation}"
end
\ No newline at end of file