Szymon Nowak
Not a member
Szymon Nowak's latest activity
Sunday, November 21 2010
-
- Assigned user set to Aaron Patterson
Ok, so to sum it all up:
The docs for both methods (https://github.com/rails/rails/blob/v2.3.10/activerecord/lib/active... and https://github.com/rails/rails/b...
Saturday, November 20 2010
-
Szymon Nowak commented at 3:58 PM@2kan: thanks for the link! It turns out that the bug is actually that find_or_initialize_by works with protected attributes in 2.3.10, although it shouldn't :)
-
Szymon Nowak commented at 3:15 PMFirst of all it's not a change in behavior from 2.2.x, but from 2.3.5 - I migrated my app from 2.3.5 directly to 2.3.10 and it stopped working.
Second thing is ...
Tuesday, November 16 2010
-
Szymon Nowak commented at 8:10 PMI'll take a look at it over the weekend, but the workaround that I'm using for now is find_or_initialize_by + save.
-
Szymon Nowak commented at 1:19 PM -
Szymon Nowak created the ticket at 1:16 PMThere's some strange problem with find_or_create_by on has_many associations and protected attributes:
user.posts.find_or_create_by_some_protected_attribute doe...
Monday, October 18 2010
-
Szymon Nowak commented at 7:44 PMI don't really think it's Rails issue. Just use Range#cover? instead:
(1.day.ago..Time.now).cover? 3.hours.ago => trueHowever, it's Ruby 1.9 only. If you're ...
Monday, October 11 2010
-
Szymon Nowak commented at 6:46 PMHere's a patch that changes the behavior to return "{}" instead of " " for JSON requests with PUT and DELETE.
It also allows to add new methods to return a vali...
Sunday, October 03 2010
-
Szymon Nowak commented at 7:12 PMI'm not sure if this will actually solve this problem for JSON format, because empty string is still considered as invalid JSON - that's why most people use wha...