method

select_database

Importance_0
v7.1.3.2 - Show latest stable - 0 notes - Class: DatabaseSelector
select_database(request, &blk) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activerecord/lib/active_record/middleware/database_selector.rb, line 72
        def select_database(request, &blk)
          context = context_klass.call(request)
          resolver = resolver_klass.call(context, options)

          response = if resolver.reading_request?(request)
            resolver.read(&blk)
          else
            resolver.write(&blk)
          end

          resolver.update_context(response)
          response
        end
Register or log in to add new notes.