class ActiveRecord::Acts::List::WithConnection
Attributes
recipient[R]
Public Class Methods
new(recipient)
click to toggle source
# File lib/acts_as_list/active_record/acts/with_connection.rb, line 7 def initialize(recipient) @recipient = recipient end
Public Instance Methods
call() { |connection| ... }
click to toggle source
# File lib/acts_as_list/active_record/acts/with_connection.rb, line 13 def call if recipient.respond_to?(:with_connection) recipient.with_connection do |connection| yield connection end else yield recipient.connection end end