aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorTeddy Wing2017-08-01 19:45:59 +0200
committerTeddy Wing2017-08-01 19:45:59 +0200
commitf189c4331d4f6f1ed10b7545d90a92dc2b7ca9b1 (patch)
tree198d60c9f9aaac94bd922689277f0cf04698c80c /app
parent240c2270ca8e21c75170d6b7764562c049ef661a (diff)
downloadchouette-core-f189c4331d4f6f1ed10b7545d90a92dc2b7ca9b1.tar.bz2
Import: Add #ready?
This boolean method answers whether or not the current import's `current_step` and `total_steps` fields match. If so, all of its subtasks are finished, in which case it can be thought of as "ready". Refs #4174, #3511
Diffstat (limited to 'app')
-rw-r--r--app/models/import.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/import.rb b/app/models/import.rb
index 3cbdb964f..46de0d727 100644
--- a/app/models/import.rb
+++ b/app/models/import.rb
@@ -20,6 +20,10 @@ class Import < ActiveRecord::Base
def child_change(child)
end
+ def ready?
+ current_step == total_steps
+ end
+
private
def initialize_fields