3 ms·
Is this solution for case-insensitive finders in ARecord good?
- iamclovin 16y agoI'm generally wary of method_missing and alias_method_chain but this seems to be a good-enough solution (which is database agnostic). How would you do case-insensitive #find?
- iamclovin 16y agoNever mind, forgot that it's bad for SEO if you try to accommodate case-insensitive finds for stuff such as permalinks (which is what I needed it for). We should be redirecting to the lowercase URL instead. Using Refraction to do that which is an awesome gem (http://github.com/pivotal/refraction http://github.com/pivotal/refraction)
- deleted 16y ago[deleted]