MonoForge

trotter / belongs_to_demeter

belongs_to_demeter

Public

Rails plugin to allow access to belongs_to association attributes through methods on the base class.

10 filesupdated Jun 18, 2026

README

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