This application is a workgroup tool that’s appropriate for small teams, as shown in Figure C-1. It provides a lot of features for office communication and collaboration: facilities for managing projects, attaching comments and documents to projects, and so on. It’s typical of many real-world applications: not flashy like Google Maps, but useful and necessary. The Ajax is also relatively low-key: it makes the application more powerful and usable, but doesn’t call attention to itself. This application also shows where not to use Ajax.
Figure 14-1. Intranet home page
To download the source to this application, rails intranet, visit http://www.oreilly.com/catalog/9780596527440. Where files aren’t listed, they are the same as the Rails default skeleton. Once the files are in the correct place, you’ll need to configure a database by editing config/database.yml. The default configuration as generated by rails intranet expects a MySQL database named
intranet_development, accessible at
localhost with the username
root and no password. To get started, create a database for the application and change database.yml as needed, then run
db:schema:load to create the application’s database structure, as specified by schema.rb.
The application uses three tables: users, posts, and attachments. The users table is for managing users, as you’d expect. Attachments ...