[Rails] - how to do SQL

M

matthias

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...
 
G

gregarican

matthias said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,274
Messages
2,571,366
Members
48,051
Latest member
noblesalt

Latest Threads

Top