diff options
| author | Xinhui | 2016-10-03 14:27:31 +0200 |
|---|---|---|
| committer | Xinhui | 2016-10-03 16:33:21 +0200 |
| commit | 5d6802c6eb0b78466a6bd1b176bfc380918c2fee (patch) | |
| tree | bf547ff60d24ab492b9a0fbd25e4949d9e4f8e1e /app/models/line_referential_sync.rb | |
| parent | a3ec27a8d971f6886712a0b19e4dbd85693882e0 (diff) | |
| download | chouette-core-5d6802c6eb0b78466a6bd1b176bfc380918c2fee.tar.bz2 | |
Add cancel sync button for testing
Diffstat (limited to 'app/models/line_referential_sync.rb')
| -rw-r--r-- | app/models/line_referential_sync.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/line_referential_sync.rb b/app/models/line_referential_sync.rb index 03fea6a97..7d0c1ba1f 100644 --- a/app/models/line_referential_sync.rb +++ b/app/models/line_referential_sync.rb @@ -6,6 +6,10 @@ class LineReferentialSync < ActiveRecord::Base after_commit :perform_sync, :on => :create validate :multiple_process_validation, :on => :create + def can_be_canceled? + [:new, :pending].include? self.status.to_sym + end + private def perform_sync create_sync_message :info, :new |
