Last active
January 20, 2016 13:13
-
-
Save VictorTpo/bd77517b0669a69f878f to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# link if | |
<%= link_to_if obj.method?, obj.show_blabla, url %> | |
# WRONG | |
class CleanSql | |
def initialize | |
@clent = Mysql2::Client.new | |
end | |
end | |
# > 10_000_000.times { CleanSql.new } | |
# > mysql too many connection | |
# GOOD | |
class CleanSql | |
CLIENT = Mysql2::Client.new | |
end | |
# > 10_000_000.times { CleanSql.new } | |
# > butter, money of butter and creamer butt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment