Working with the Rails Web Interface

btn_watchdemo20070807

So far in this guided tour I’ve ignored the primary purpose of a Rails application — implementing a web database application. Although Track Magic allows you to view and work with your data without using the Rails web interface, it is intended as a supplement to the web interface, not a replacement. Let me show you how Track Magic operation interacts with Rails normal web interface. For this demonstration I’ll continue with the donors table I just created (see Creating a New App).

003_DonorsDataSheet

There is no need to fire up Terminal.app to launch the Mongrel web server from the shell, I simply choose the Start Mongrel from a submenu in the Rails menu.

001_StartMongrelMenu

After a short delay Track Magic lets me know the server is running. (If I don’t want to bother with launching Mongrel at all I can ask Track Magic to start it automatically when I open this Panorama database. See Working with Mongrel for more information.)

002_MongrelStartNotification

Once the server is running I can choose the Index command (from the Open Rails Web Page submenu of the Rails menu) to open Safari and view the application using the Rails web code.

004_DonorsWebIndexPage

At the bottom of the standard Rails index page is a link for creating a new record in the table.

006_DonorsWebIndexPage

The browser flps to the new page.

007a_DonorsWebNewRecordBlank

I fill in the blanks and press the Create button to add the new donor.

008_DonorsWebNewRecord

Since Track Magic is fully integrated with Rails, I can easily bring up this new record in my Panorama data sheet. I simply choose Download Data from Rails from the Rails menu and the new record appears at the bottom of the sheet.

009_DonorsDataSheet

Continue the Tour —> Addresses & Labels