Home arrow Ruby-on-Rails arrow Page 2 - Connecting Your Reports to the World
RUBY-ON-RAILS

Connecting Your Reports to the World


Creating reports that can be viewed on the desktop is good; creating reports that can be viewed over the Internet is even better. This article will explain how to make reports written with Ruby-on-Rails accessible over the web. It is excerpted from chapter 5 of the book Practical Reporting with Ruby and Rails, written by David Berube (Apress; ISBN: 1590599330). This article is the first part of a two-part series.

Author Info:
By: Apress Publishing
Rating: 5 stars5 stars5 stars5 stars5 stars / 1
March 25, 2010
TABLE OF CONTENTS:
  1. · Connecting Your Reports to the World
  2. · Live Intranet Web Reporting with Rails
  3. · Setting Up the Database
  4. · Adding the Data

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Connecting Your Reports to the World - Live Intranet Web Reporting with Rails
(Page 2 of 4 )

 

Let's return to Transmegtech Studios, the fictional game development company we've used for the examples in the previous chapters. Transmegtech has decided to hire actors to do full-motion videos for its latest games. In order to save on costs, the studio is hiring several full-time actors and having them act in different games simultaneously. The various game sequences are filmed in different offices on different days.

Your manager wants you to create an application that tells actors where they need to appear for the day. The actors will check the schedule for the next day before they leave the office each day, but if they forget, they can use their cell phone to check the schedule in the morning. Of course, this means that the reporting application will need to be accessible via cell phone as well as the Web.

Before you get started, you need to install the Rails gem. You can do so as follows:

gem install rails -y


Note  The first example in this chapter is compatible with Rails versions 1.2 and later. The next example works with only versions 2.0 and later, so youll need to upgrade your Rails installation with ge m update y rails if you have an older version .

Next, create a new Rails application called actor_schedule, as follows:

rails actor_schedule

--------------------------------------------
  create  app/controllers
  create  app/helpers
  create  app/models
  create  app/views/layouts
  create  config/environments
  create  components
  create  db
  create  doc
  create  lib
  create  lib/tasks
  create  log
  create  public/images
  create  public/javascripts
  create  public/stylesheets
  create  script/performance
  create  script/process
  create  test/fixtures
  . . .
  create  public/404.html
  create  public/500.html
  create  public/index.html
  create  public/favicon.ico
  create  public/robots.txt
  create  public/images/rails.png
  create  public/javascripts/prototype.js
  create  public/javascripts/effects.js
  create  public/javascripts/dragdrop.js
  create  public/javascripts/controls.js
  create  public/javascripts/application.js
  create  doc/README_FOR_APP
  create  log/server.log
  create  log/production.log
  create  log/development.log
  create  log/test.log
--------------------------------------------

Rails creates quite a few files and directories for you, in a directory structure that will hold the code that makes up our application. All of these directories and files are stored in a directory named after the project. In this case, the directory is actor_schedule, and so all of the paths in this example will be underneath the actor_schedule directory.


blog comments powered by Disqus
RUBY-ON-RAILS ARTICLES

- Adding Style with Action Pack
- Handling HTML in Templates with Action Pack
- Filters, Controllers and Helpers in Action P...
- Action Pack and Controller Filters
- Action Pack Categories and Events
- Logging Out, Events and Templates with Actio...
- Action Pack Sessions and Architecture
- More on Action Pack Partial Templates
- Action Pack Partial Templates
- Displaying Error Messages with the Action Pa...
- Action Pack Request Parameters
- Creating an Action Pack Registration Form
- Ruby on Rails Templates and Layouts
- Action Pack Controller Creation
- Writing an Action Pack Controller

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 6 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials