At what point in rails are the methods for a models attributes
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
s = Playlist.find(:first).playlist_items.methods(true).include?
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?
They get generated when they are needed (via method_missing). Why do
you care about whether the methods exists rather than just going ahead
and calling them ?