@sgrif Is there any reason ActiveRecord predicate builder doesn't work with Set's by default? Could even just use ArrayHandler.
-
-
@sgrif Whereas a Set is more likely to be passed in from outside the model. 9/9 -
@BrianVanLoo Call to_a on it
End of conversation
New conversation -
-
-
@sgrif So I've spent more time looking at Set as a predicate builder handler and coercion (probably more time than my boss would like). 1/Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@sgrif And I still disagree with how this works. From what I can tell there is no way to use a stock Set as a predicate builder handler. 2/Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@sgrif I think that use of any unmodified type as a predicate should either produce reasonable SQL or some sort of discernable error. 3/Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@sgrif Like in the case of a where on an integer field: types like Set that don't define to_i get a SQL comparison to nil/null. 4/Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@sgrif It seems like that should at least raise an error. 5/Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@sgrif I also amend my viewpoint on Struct: Struct is less like a type and more like a class generator. 6/Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@sgrif So it is usually used very differently than something like Set which feels like just another type. 7/Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@sgrif Also, Hashes that get built to be used with where are likely more local to the model as they describe database join structure. 8/Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.