Adam Wróbel
Not a member
Adam Wróbel's latest activity
Thursday, March 17 2011
-
Adam Wróbel commented at 1:17 PMI've started a discussion on core with suggestion to change scope syntax. I think the syntax change is certainly a better way of resolving this issue than a hac...
Thursday, February 03 2011
-
Adam Wróbel commented at 12:22 AMI know you specify multiple columns for order, but when I referred to multi and single values I meant values that get merged and values that get overwritten. My...
-
Adam Wróbel commented at 12:05 AMAn alternative would be to overwrite on merge, but append on order(). That would be similar to where(:column => value). Multiple where() calls create OR but dur...
Wednesday, February 02 2011
-
Adam Wróbel commented at 11:27 PMI suggest moving order from MULTI_VALUE_METHODS to SINGLE_VALUE_METHODS and overwriting the order array with each merged scope or new call to order(). There's n...
Monday, January 31 2011
-
- Tag changed from rails 3.1 to rails 3.1, default_scope, named_scope, patch
This problem can also surface when using named scopes.
class Widget < ActiveRecord::Base default_scope lambda { where(['created_at >= ?', 10.minute.ago]) } ...
Saturday, January 29 2011
-
Adam Wróbel commented at 2:05 PMThanks for finding this issue.
You're right that those latter calls calculate previously defined lambdas and append their results to the final query. A test wit...
Tuesday, January 25 2011
-
Adam Wróbel commented at 2:07 PMIt's currently waiting to be reviewed by Aaron and hopefully merged into edge for a release in 3.1. And yes - that code allows one to call default_scope multipl...
-
Adam Wróbel commented at 1:39 PMThere is an open ticket to enable proc handling for default scope. It contains a patch that enables lambda default scopes instead of raising an exception on rec...
Saturday, January 22 2011
-
Adam Wróbel commented at 4:24 PMThis is unrelated to the lambda support. Uniqueness validator just ignores the default_scope regardless of whether it's lambda or arel finder.
Thursday, January 20 2011
-
Adam Wróbel commented at 5:27 PMI was reminded to use respond_to?(:call) instead of kind_of?(Proc) on github. Here's a corrected patch.