class G5Updatable::SyncsController < G5Updatable::BaseUpdatableController before_action :set_client def index timestamp = @client.locations.max_updated_at render json: { updated_at: formatted_timestamp(timestamp) } end private def set_client @client = G5Updatable::Client.find_by_urn!(params[:urn]) end def formatted_timestamp(timestamp) timestamp.in_time_zone.strftime("%I:%M%P on %B %e, %Y") if timestamp end end