class TrustyCms::TaskSupport

def establish_connection

def establish_connection
  unless ActiveRecord::Base.connected?
    connection_hash = YAML.load_file("#{Rails.root}/config/database.yml").to_hash
    env_connection = connection_hash[Rails.env]
    ActiveRecord::Base.establish_connection(env_connection)
  end
end