Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 19 lines (16 sloc) 0.476 kB
03b55c5 @mislav fix a helper in railsrc
authored
1 #!/usr/bin/env ruby
587dd21 @mislav dotfilez\!
authored
2 def l(stream = STDOUT)
3 ActiveRecord::Base.logger = Logger.new(stream)
c423a11 @mislav update STDOUT logger method to work with both Rails 2.1 and 2.2
authored
4 if Rails::VERSION::MAJOR >= 2 and Rails::VERSION::MINOR >= 2
5 ActiveRecord::Base.connection_pool.clear_reloadable_connections!
6 else
7 ActiveRecord::Base.clear_active_connections!
8 end
587dd21 @mislav dotfilez\!
authored
9 "logger reset!"
10 end
11
12 # def method_missing(method, *args, &block)
13 # User.find_by_login(method.to_s) || super
14 # end
15
16 def sql(query)
17 ActiveRecord::Base.connection.select_all(query)
18 end
Something went wrong with that request. Please try again.