Module: Handcuffs::PendingFilterExt
- Defined in:
- lib/handcuffs/pending_filter_ext.rb
Overview
PendingFilter is prepended to ActiveRecord::Migrator in the rake tasks in order to check the current phase before it is run
Instance Method Summary collapse
Instance Method Details
#runnable ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/handcuffs/pending_filter_ext.rb', line 7 def runnable attempted_phase = self.class.handcuffs_phase if @direction == :up Handcuffs::PhaseFilter.new(attempted_phase, @direction).filter(super) else phase_migrations = Handcuffs::PhaseFilter.new(attempted_phase, @direction).filter(migrations) runnable = phase_migrations[start..finish] runnable.pop if target runnable.find_all { |m| ran?(m) } end end |