Sha256: 8f003d07dc48e5486283de4108b8576eef9429ff834050c85a002da8b468cea2
Contents?: true
Size: 495 Bytes
Versions: 23
Compression:
Stored size: 495 Bytes
Contents
namespace :fix do desc 'Fix acts as list positions if they ever get out of sync for a model' task :acts_as_list_positions => :environment do raise ArgumentError, 'You must specify model with MODEL environment variable' if ENV['MODEL'].nil? model_class = ENV['MODEL'].camelize.constantize scope_name = ENV['SCOPE'].try(:to_sym) position_column = ENV['POSITION'].try(:to_sym) PositionInitializer.positionalize(model_class, scope_name, position_column) end end
Version data entries
23 entries across 23 versions & 1 rubygems