Hi,
I just ran into an unitialized contstant error for ‘Mp3’ with rails.
When I generated my model from the commandline, I used something like…
‘ruby script/generate model MP3’ and it created mp3.rb with an AR class
called ‘MP3’, so I figured it was ok, but now this doesn’t seem to work.
Going in and changing all references of the ‘MP3’ class to ‘Mp3’ seemed
to fix it, but it doesn’t look as nice since it’s supposed to be an
acronym. Is there any way I can make it respect those capitalization
rules? I haven’t gotten this far yet, but will I most likely run into
the same problem with a ‘CD’ class?
I am using InstantRails (thanks Curt!) updated to 1.0 RC5 gems. The
actual line that seems to have caused the problem was:
track.mp3 = MP3.new( :filename => ‘blah’ )
In the above, Track has_one :mp3 and MP3 belongs_to :track
Just for fun I tried ‘track.m_p3’ too and it didn’t work. Tried to
google for a solution since I’m sure I’m not the first, but I came up
empty handed.
Thanks in advance!
-Pawel