search for: some_database_attribute

Displaying 1 result from an estimated 1 matches for "some_database_attribute".

2008 Jan 30
0
Plugin belongs_to Model Association Bug
...belongs_to :topic ... end I can set the forum, user, and topic for this class fine, and they save without issue. However, when I go to access the user association later on, I can only get its database fields, not any of the methods that are defined in the User model. That is, @post.user[:some_database_attribute] will display fine @post.user.any_method_at_all will give me a "No method found" error. If I check what kind of class @post.user is, Ruby will report it is a "User" class. I have tried to hack around this by doing a "def user { User.find(user_id) }" in the plugin, bu...