I am learning Radrails and want to tie the web project all together by
displaying 3 tables linked together.
I want to select one item from the main table, and then link to the
other two tables. they will be linked by the key of the first table.
It seems that I should create a rhtml in a main table or should I just
copy the list.rhtml created by the generator scaffold?
I might not make any sense, but I hope I do
Radrails is a product, not a programming language or framework.
controller should get your results
@table1 = Table1.find(:all)
@table2 = Table2.find(:all)
@table3 = Table3.find(:all)
your rhtml view should then display them in tablular form using
|<%=t.first_name %>||<%=t.last_name %><% end %>|
Rails is just like any other scripting language when it comes to the
parts… you have an object and you display it’s data using the <%= %>
syntax simliar to ASP and JSP.
If none of this makes sense, you need to stop what you’re doing and get
book, preferably the Agile Web D. with Rails book.
Hope that helps… good luck!