Created
February 11, 2010 12:48
-
-
Save rafaelss/301472 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# isso não devia ser assim | |
ActiveRecord::Base.connection.select_all("select count(*) as count from ...;")[0]['count'].to_i | |
# e sim, assim :) | |
ActiveRecord::Base.connection.select_value("select count(*) as count from ...").to_i |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment