forked from OpenNeo/impress
Dress to Impress, a big fancy Neopets customization tool!
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! |
||
---|---|---|
.vscode | ||
app | ||
bin | ||
config | ||
db | ||
deploy | ||
doc | ||
lib | ||
public | ||
script | ||
spec | ||
test | ||
tmp | ||
vendor | ||
.gitignore | ||
.ruby-version | ||
config.ru | ||
Gemfile | ||
Gemfile.lock | ||
LICENSE.md | ||
package.json | ||
Procfile.dev | ||
Rakefile | ||
README | ||
yarn.lock |
An extension of Dress to Impress (PHP) that runs on Ruby on Rails. I wanted to use Rails initially for Impress, but hoped that using PHP would allow me to attract more developers. Looks like that wasn't the case, so I just went with what I loved and made the items database in Rails. Future Impress sections will likely find themselves in this project, rather than the PHP project.