Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 536fbf23ca
Fetching contributors…

Cannot retrieve contributors at this time

19 lines (16 sloc) 0.476 kb
#!/usr/bin/env ruby
def l(stream = STDOUT)
ActiveRecord::Base.logger = Logger.new(stream)
if Rails::VERSION::MAJOR >= 2 and Rails::VERSION::MINOR >= 2
ActiveRecord::Base.connection_pool.clear_reloadable_connections!
else
ActiveRecord::Base.clear_active_connections!
end
"logger reset!"
end
# def method_missing(method, *args, &block)
# User.find_by_login(method.to_s) || super
# end
def sql(query)
ActiveRecord::Base.connection.select_all(query)
end
Jump to Line
Something went wrong with that request. Please try again.