Sha256: ecbbdc54c03cc154c08da8d3afaadda0a931ef0070fb7c562e2c5e8ffb4db1e9

Contents?: true

Size: 434 Bytes

Versions: 5

Compression:

Stored size: 434 Bytes

Contents

namespace :easy do
  namespace :reference_data do
    desc "Refreshes reference data values for the current environment."
    task :refresh => :environment do
      files = Dir[File.join(Rails.root, 'db', 'reference', '*.rb')].sort
      files += Dir[File.join(Rails.root, 'db', 'reference', Rails.env, '*.rb')].sort

      files.each do |file|
        puts "Populating reference #{file}"
        load file
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
easy_reference_data-1.0.0 lib/tasks/easy_reference_data.rake
easy_reference_data-0.1.2 lib/tasks/easy_reference_data.rake
easy_reference_data-0.1.1 lib/tasks/easy_reference_data.rake
easy_reference_data-0.1.0 lib/tasks/easy_reference_data.rake
easy_reference_data-0.0.2 lib/tasks/easy_reference_data.rake