forked from OpenNeo/impress
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! |
||
|---|---|---|
| .. | ||
| item | ||
| application_record.rb | ||
| auth_record.rb | ||
| auth_user.rb | ||
| campaign.rb | ||
| closet_hanger.rb | ||
| closet_list.rb | ||
| closet_visibility.rb | ||
| color.rb | ||
| contribution.rb | ||
| donation.rb | ||
| donation_feature.rb | ||
| fragment_expiration.rb | ||
| fragment_localization.rb | ||
| image.rb | ||
| item.rb | ||
| item_outfit_relationship.rb | ||
| neopets_connection.rb | ||
| neopets_page.rb | ||
| neopets_user.rb | ||
| outfit.rb | ||
| parent_swf_asset_relationship.rb | ||
| pet.rb | ||
| pet_attribute.rb | ||
| pet_state.rb | ||
| pet_type.rb | ||
| pretty_param.rb | ||
| species.rb | ||
| static_resource.rb | ||
| swf_asset.rb | ||
| user.rb | ||
| zone.rb | ||