- how to do SQL


#1

Hello,

Up to now I developed some small basic Rails applications. I’ve always
started with a DB model and the rails mapping worked as expected.

Now I’m confronted with the situation, that the DB model is already
done,
and I cannot change it. Of course there is no rails naming convention,
So I need to programm the SQL statements.

What is the best way to do it? Where should I place the SQL code (model,
helper, controller?). How can I create a pagination table? How can I
sort the table?

Some working example code (not only snippets) would be very helpful.

Thanks.
Matthias

P.S.: If this is a FAQ, please post the link, I’m googleing for hours…


#2

matthias wrote:

Up to now I developed some small basic Rails applications. I’ve always
started with a DB model and the rails mapping worked as expected.

Now I’m confronted with the situation, that the DB model is already done,
and I cannot change it. Of course there is no rails naming convention,
So I need to programm the SQL statements.

You might have better results posting this to the Rails mailing list at

http://lists.rubyonrails.org/mailman/listinfo.