public Method

Base.connection

Returns the connection currently associated with the class. This can also be used to "borrow" the connection to do database work that isn’t easily done without going straight to SQL.

Source Code

# File active_record/connection_adapters/abstract/connection_specification.rb, line 173
def connection
  self.class.connection
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.