On May 14, 2:57 pm, Wouter de Bie <[email protected]>
wrote:
> The strange thing that happens however is that when I get the payment
> type through a customer category, suddenly payment_type_id is added as
> an attribute to the payment type object. So
> CustomerCategory.find(1).payment_types[0].attributes returns
> {"payment_type_id" => "1", "name" => "mastercard"}.
>
> Is this a Rails feature or a bug?
>
It's a semi deprecated feature: getting attributes from the join table
automatically. The trend has since been to make that join table a
model in its own right.

Fred

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to