Collectik Home Collectik Homepage   Help   Login/Register

like mixtapes for podcasts

Alias Attribute

from roob's pipe

external site | Recommend | Fri, 20 Jun 2008 04:36

In a certain application that I’m working on, accounts have subdomains. Nothing new. The column name I used for subdomain in the accounts table was…wait for it…subdomain! DHH’s account_location plugin, however, assumes username as the default attribute. Whatever was I to do? I liked subdomain but I didn’t want to have to pass it in each time I used the plugin methods. Maybe this is a bad example as there are a crap load of really easy solutions to this problem (migration, change plugin, etc.) but I just used alias_attribute. The method was introduced way back in 1.2 and even made it into...