STI and acts_as_list: scope => type does not work?

Hi all

I have a model Product1 and Product2 which both have Product as parent
class. I use single table inheritance to share their similar DB fields.

Now I wanted to add acts_as_list for them, and wanted to use :scope =>
:type so the position numbers are not shared between Product1 and
Product2 but every Class has its own order.

Sadly when adding a new Product1 or Product2 I get the following error:

NameError in UnikateController#manage
undefined local variable or method `type_id’ for #Product1:0x25a5270

Why does Rails append an “_id” suffix to type? Is it not possible to use
“type” only?

Thanks. Josh

Well got it myself already.

Rails API:
scope - restricts what is to be considered a list. Given a symbol, it’ll
attach “_id” (if that hasn’t been already) and use that as the foreign
key restriction.

So I’m using a string now instead of a symbol, and it works. Quite
strange behavior though, is this consistently used throughout Rails?
“Symbols can be modified by Rails, strings are taken as-is”?