Home arrow Ruby-on-Rails arrow Page 4 - Ruby: Modules, Mixins, Fixins, and Rails
RUBY-ON-RAILS

Ruby: Modules, Mixins, Fixins, and Rails


Some time ago we discussed working with Ruby Objects and Classes. We are going to continue that discussion some more here, as we learn to work with Modules and Mixins. After that we will go over Rails and learn to create our first application with it.

Author Info:
By: James Payne
Rating: 2 stars2 stars2 stars2 stars2 stars / 13
April 21, 2008
TABLE OF CONTENTS:
  1. · Ruby: Modules, Mixins, Fixins, and Rails
  2. · A Few Notes
  3. · Going off the Rails of the Crazy Train
  4. · Controlling the Situation

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Ruby: Modules, Mixins, Fixins, and Rails - Controlling the Situation
(Page 4 of 4 )

To make an application work, you first need a controller. The controller is the evil overseer, the big boss, the big cheese, the head honcho, the imperial slave-driver. He is that guy that says: "I think the benefits of slavery outweigh its drawbacks" and then makes you carry heavy boulders back and forth.

To create this big galoot we use the following ruby command: ruby script/generate controller controllername. Below we will create a controller named Willis, in the hopes of later learning what the heck he was talking about:


ruby script/generate controller Willis

If you go to rubymyfirsttimeappcontrollers you will see a file name willis_controller.rb. This is the file you just created.

Hanging off the Side of a Cliff

Well, the time has come to end this article. But, but but...I know. We haven't yet made our first web page. But never fear: the next article will continue our discussion of Rails, and show you how to make your first bona fide web application.

Till then...


DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

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 9 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials