tsukasaoishi / fresh_connection

FreshConnection provides access to one or more configured database replicas.
MIT License
58 stars 11 forks source link

Error undefined method `establish_fresh_connection' for ApplicationController:Class #28

Closed thaitoanit closed 6 years ago

thaitoanit commented 6 years ago

Hi man, I use this gem on rails 5

After i try add establish_fresh_connection :replica in class ApplicationController < ActionController::Base . My app return error NoMethodError - undefined methodestablish_fresh_connection for ApplicationController:Class: `

Please help me :(

tsukasaoishi commented 6 years ago

establish_fresh_connection is defined to ActiveRecord::Base class. You don't need to use establish_fresh_connection in ApplicationController.