trotter / belongs_to_demeter
belongs_to_demeter
PublicRails plugin to allow access to belongs_to association attributes through methods on the base class.
10 filesupdated Jun 18, 2026
files10Download
./libJun 18, 2026./tasksJun 18, 2026./testJun 18, 2026init.rbJun 18, 2026install.rbJun 18, 2026MIT-LICENSEJun 18, 2026RakefileJun 18, 2026READMEJun 18, 2026TODOJun 18, 2026uninstall.rbJun 18, 2026README
BelongsToDemeter
BelongsToDemeter is a Rails plugin that lets you access attributes of a belongs_to association through methods on the base class. It's poor code, but a fun idea.
Example
The next line will do a User.find_by_login('bob') and assign it to
@character.user
@character.user_login = "bob"
You can then fetch the user's name by doing
@character.user_name = "Bob Jones"
Copyright (c) 2008 [Trotter Cashion], released under the MIT license