Sha256: 61a2a439074eaf9f3333711c21d101a41b651f8bff7330a3549a62d671ab8d1c
Contents?: true
Size: 539 Bytes
Versions: 1
Compression:
Stored size: 539 Bytes
Contents
# frozen_string_literal: true require 'rails-pg-extras' namespace :pg_extras do desc "Establish connection" task :establish_connection do db_config_file = File.open('config/database.yml') db_config = YAML::load(db_config_file) ActiveRecord::Base.establish_connection(db_config[Rails.env]) end RailsPGExtras::QUERIES.each do |query_name| desc RubyPGExtras.description_for(query_name: query_name) task query_name.to_sym => :establish_connection do RailsPGExtras.public_send(query_name) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rails-pg-extras-1.2.2 | lib/rails-pg-extras/tasks/all.rake |