Flowdock
method

current_role

Importance_1
v7.1.3.2 - Show latest stable - 0 notes - Class: Core
current_role() public

Returns the symbol representing the current connected role.

ActiveRecord::Base.connected_to(role: :writing) do
  ActiveRecord::Base.current_role #=> :writing
end

ActiveRecord::Base.connected_to(role: :reading) do
  ActiveRecord::Base.current_role #=> :reading
end
Show source
Register or log in to add new notes.