Sha256: 27c79f3509223d7b45d3c5c6380c589022f18fd6d0f5b4c4d0e5db4b53ef4574
Contents?: true
Size: 542 Bytes
Versions: 37
Compression:
Stored size: 542 Bytes
Contents
module Apidae class Export < ActiveRecord::Base PENDING = 'pending' COMPLETE = 'complete' CANCELLED = 'cancelled' validates_presence_of :file_url, :project_id before_save :normalize_url def normalize_url self.file_url = file_url.strip unless file_url.include?('/') self.file_url = "http://export.apidae-tourisme.com/exports/#{file_url}" end end # Note : handle reset case def self.pending where(remote_status: 'SUCCESS', status: PENDING).order(:id) end end end
Version data entries
37 entries across 37 versions & 1 rubygems