Forums | Admin

Discussion Forums: drysql_help

Start New Thread Start New Thread

 

By: Juan Tarquino
RE: No matching table for addres [ reply ]  
2007-02-22 01:51
I solved the problem by adding a new rule to the Inflection class in my environment.rb to handle the word address correctly.
I also had to modify the associations.rb in the drysql gem to send association_class_name_from_table_name the table name and not the class name. e.g: in generate_has_many_associations :
has_many_class_name = association_class_name_from_table_name(foreign_constraint.table_name).pluralize


By: Bryan Evans
RE: No matching table for addres [ reply ]  
2007-02-19 16:35
Hi Juan

I'll look into this. I'm guessing that DrySQL is incorrectly singularizing your table names somewhere in the association generation logic.

- Bryan

By: Juan Tarquino
No matching table for addres [ reply ]  
2007-02-17 14:54
Drysql is trying to look for a table called addres and a table called students_join_addres. I do not have any table like that. I used to have a table called Address, but I renamed it to Adresses and the join table to students_join_addresses. I do not have any class named addres, Why is Drysql looking for addres then?

I am using Postgres 8 on winXP.