Matchu
f8cf3fd701
Huh, Arel can *sometimes* handle just having an attribute stand in as "X is true" in a condition, but sometimes gets upset about it. I guess this changed in Rails since we recently wrote this? Specifically, item search would crash on "is:nc" (but *not* "is:np"), saying: ``` undefined method `fetch_attribute' for #<struct Arel::Attributes::Attribute relation=#<Arel::Table:0x0000000109a67110 @name="items", @klass=Item(…), @type_caster=#<ActiveRecord::TypeCaster::Map:0x0000000109a66e90 @klass=Item(…)>, @table_alias=nil>, name="is_manually_nc"> ``` The traceback was a bit misleading (it happened at the part where we merge all the scopes together), but that hinted to me that it working with an attribute in a place where it expected a conditional. So I converted the attribute in the `is_nc` scope to a conditional, and made the matching change in `is_np`, and that fixed it! Ok phew! |
||
---|---|---|
.. | ||
assets | ||
controllers | ||
helpers | ||
javascript | ||
mailers | ||
models | ||
views |