0

I have studied rails for some time now and everywhere I look, the books teach you how to create blog like applications.

But now I would like to create an application, where you have for instance a form to choose how many calculations I want to do and a form to choose what type of calculations should they be. After that I would insert numbers into newly created forms and the app would calculate them and print the anwer.

Now I really don't see, how I can do this without putting the numbers inserted into a DB and then calculating with them, printing the answer and then deleting the DB entries. Seems like a very clumsy way doing it.

Anyone have some advice on how to approach this problem?

4

1 回答 1

0

我看到的方式是:您创建一个包含可能计算选项的下拉列表,并使用 javascript(或 ajax,如果它很复杂)对其进行增强以插入所需的字段。然后,您将所有数据保存在一个表格中,将其发送到操作中,进行计算并显示它们。

于 2013-10-15T08:33:00.660 回答