Szymon Nowak
Not a member
Szymon Nowak's latest activity
Wednesday, April 27 2011
-
Szymon Nowak commented at 9:37 AMWouldn't actually moving
counter_cachedeclaration frombelongs_totohas_manysolve this problem?class Post has_many :likes, :class_name => "Vote", :condit...
Monday, April 11 2011
-
Szymon Nowak commented at 2:10 PMI'm for #2 in a short term, because right now it doesn't work at all.
However, having e.g. the following requirement: "Display the latest post posted by each us...
Thursday, March 24 2011
-
Szymon Nowak commented at 7:51 PMTurns out that
HasManyThroughAssociationhas a simple alias:alias_method :new, :build, whichHasManyAssociationdoesn't have. Not sure if it's on purpose. -
Szymon Nowak created the ticket at 7:42 PMI'm not sure how exactly collection.new should behave, as it's not really documented (at least not here: http://api.rubyonrails.org/classes/ActiveRecord/Associ...
Thursday, March 03 2011
-
Szymon Nowak commented at 4:42 PMOk, the example with email was maybe not very fortunate, but in case of WHERE IN clause it really is not consisten:
class User < ActiveRecord::Base scope :a,... -
Szymon Nowak created the ticket at 3:06 PMRails 3.0.5:
class User < ActiveRecord::Base scope :a, where(:email => "a") scope :b, where(:email => "b") def self.c; where(:email => "c"); end def...
Thursday, February 24 2011
-
Szymon Nowak commented at 10:03 AMJust small update - it seems that the column in DISTINCT ON must match the first column in ORDER BY clause:
This works fine:
SELECT DISTINCT ON(countries.name)...
Tuesday, February 22 2011
-
Szymon Nowak commented at 3:00 PM-
Rails store the current time zone in Thread.current[:time_zone], so it is possible and very likely that on production server if you change time zone in one re...
-
Friday, February 18 2011
-
Szymon Nowak created the ticket at 3:52 PMFor the following query
Country.select("DISTINCT ON(countries.id) countries.*").joins(:cities).order("countries.name ASC")Arel generates the following SQL (i...
Sunday, January 30 2011
-
Szymon Nowak created the ticket at 8:40 AMWarning at the end of section 2.5 in I18n guide for Rails 3.0 (http://guides.rubyonrails.org/i18n.html#setting-the-locale-from-the... - "This solution has curre...