public
Description: Rails plugin to allow access to belongs_to association attributes through methods on the base class.
Homepage:
Clone URL: git://github.com/trotter/belongs_to_demeter.git
100644 19 lines (13 sloc) 0.484 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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