access connection through class

This commit is contained in:
Jonne Haß 2013-08-31 14:16:03 +02:00
parent 2f54d4f17d
commit cb195f4d55

View file

@ -144,7 +144,7 @@ class Profile < ActiveRecord::Base
if @tag_string if @tag_string
@tag_string @tag_string
else else
rows = connection.select_rows( self.tags.scoped.to_sql ) rows = self.class.connection.select_rows( self.tags.scoped.to_sql )
rows.inject(""){|string, row| string << "##{row[1]} " } rows.inject(""){|string, row| string << "##{row[1]} " }
end end
end end