Hello,
I’m a ROR newbie and have been pulling my hair out for a day trying to
figure out why I was getting an ActiveRecord::StatementInvalid when
trying to create a new record with a simple relationship. I have been
playing with ROR for a few days now and, ironically, this was the first
table that I tried to create associated records against.
Details: Table name: Quotes defined with has_many Activities. Upon
trying to create an activity (belongs_to :quotes) I would get an error
message indicating the SQL was invalid. This is a very simple
relationship and I couldn’t understand why I had downloaded samples with
belongs_to that worked but why I couldn’t get mine to work.
I found a post (gmane.comp.lang.ruby.rails:21139) with the same exact
problem but that went unresolved. I’m new to mailing lists and don’t
know how to reply directly to that post. He had this problem with the
same table name that I was using. That prompted me to change my table
name. Upon changing, everything works as expected.
Is there a way that this can get fixed? Anyone building a CRM
application will need a table called Quotes.
On a side note: I love this application - despite the troubles I had
with this table. I learned a lot while trying to troubleshoot this
problem.
Many thanks,
Michael