At what point in rails are the methods for a models attributes defined?
Because I have the following code:
And it returns in irb:
s = Playlist.find(:first).songs
If I do this in irb: (The PlaylistItem model has an attribute ‘position’
s = Playlist.find(:first).playlist_items.methods(true).include?(‘position’)
How’s that possible? Does irb do some fancy trick to retrieve all
Must I do something in the instance_eval to make the methods appear?