app/models/observation.rb
#
# Return a time from observed_on and time_observed_at
#
Return a time from observed_on and time_observed_at
Return a time from observed_on and time_observed_at
def datetime
    if observed_on && errors[:observed_on].blank?
      if time_observed_at
        Time.mktime(observed_on.year, 
                    observed_on.month, 
                    observed_on.day, 
                    time_observed_at.hour, 
                    time_observed_at.min, 
                    time_observed_at.sec, 
                    time_observed_at.zone)
      else
        Time.mktime(observed_on.year, 
                    observed_on.month, 
                    observed_on.day)
      end
    end
  end
def datetime if observed_on && errors [ :observed_on ] . blank? if time_observed_at Time . mktime ( observed_on . year , observed_on . month , observed_on . day , time_observed_at . hour , time_observed_at . min , time_observed_at . sec , time_observed_at . zone ) else Time . mktime ( observed_on . year , observed_on . month , observed_on . day ) end end end
Return a time from observed_on and time_observed_at
Return a time from observed_on and time_observed_at