Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))

Well House Consultants
You are on the site of Well House Consultants who provide Open Source Training Courses and business hotel accommodation. You are welcome to browse and use our resources subject to our copyright statement and to add in links from your pages to ours.
Other subject areas - resources
Java Resources
Well House Manor Resources
Perl Resources
Python Resources
PHP Resources
Object Orientation and General topics
MySQL Resources
Linux / LAMP / Tomcat Resources
Well House Consultants Resources
Extras Resources
C and C++ Resources
Ruby Resources
Tcl/Tk Resources
Web and Intranet Resources
Ruby module R202
Ruby on Rails
Exercises, examples and other material relating to training module R202. This topic is presented on public course Ruby on Rails

Ruby is a great, pragmatic langauge and Rails lets you use it by providing the framework through which you can interface databases to you ruser's browser, using the framework of Rails and the glue of Ruby. Ruby can be embedded within pages at a View level, built in, or used at the Controller level via ApplicationController classes. This module opens the door on a very powerful and effective system.
Related technical and longer articles
Ror - Ruby on Rails

Articles and tips on this subjectupdated
4013Web Frameworks - nested templates
There are times when an inversion of long-accepted logic makes sense. I've been working in a many-floored office block in Salford this week, with a bank of lifts to travel between floors. Rather than press a button for your floor once you're in the lift, you press a button in the lift lobby when you ...
4010Really Simple Rails
Rails is a "Web Framwork" that uses code written in the Ruby language to do the things that vary from one web application to another. There are a huge number of features common to many web applications, and by using a framework you can save yourself the trouble of rewriting all these common things, ...
3919What is a web framework?
When you write web applications, there are many features you'll need which mirror features other people have needed too. Now - there's nothing to stop you writing your own code (maybe in Ruby, Python or Perl) including these features ... but wouldn't it be better to use the feature set that someone ...
3777Multiple views in a single appication - sharing common parts of the template - Ruby on Rails
So far ... we have installed Rails, and written a simple application with a single model, controller and view. In this article, I'll show you how to add a second controller method, and view, while sharing much of the view template. The example takes the scenario of a database of products where you ...
2605Ruby on Rails - a sample application to teach you how
The Ruby on Rails Framework is a great way to put bolt web applications together quickly - but it can be overwhelming when you come to do it for the first time. There's a steep learning curve with all the various elements to put together to make up the whole. We have a first (tiny!) demonstration in ...
3780Ruby of Rails - cleanly displaying model data in the view
The display of data from our model has - thus far - been formatted in the Controller (when that really ought be in the view) and has been liable to fail to display properly if the data contains HTML special characters such as < and &. The solution to this is provided for you by rails - simply ...
3779Adding validation to form entries and sticky fields - Ruby on Rails
So far, we have implemented an MVC application under Ruby in Rails, and provided a rudimentary form to allow the user to add rows to the model. In this section, we show you the extra code needed to validate the data, and to echo it back out to the user within the form if it's incorrect. 1. In the model, ...
3778Providing a form to allow the user to add data to the model - Ruby on Rails
So far, we have implemented a single model - view - controller application using Ruby on Rails, and displayed the data in several forms. How do we add new data? We need to provide an "add product" form, and code to handle that form when it's submitted. Building on the example so far, here's how: Adding ...
3772Hello World - Ruby on Rails - a checklist of each step
Ruby on Rails is a framework under which web applications written in Ruby can be run on a web server, via a browser. You could make your own applications from first principles, but Rails does most of this for you already, so it's typically going to be a huge resource saving for you as you write and maintain ...
3756Ruby on Rails - how it flows, and where the files go
Ruby on Rails is a web framework that lets you use Ruby code to add dynmaics to your web site, using the MVC (Model, View, Controller) architecture that keeps the look and feel of the page (View) apart from the business logic (Model), linking the two via the Controller. Rails provides the framework ...
3624Why do we need a Model, View, Controller architecture?
In the very early days of the web, it was a source of data - with files of marked up text (in HTML) being sent out to a browser program by a server running on a central computer. Requests to the central server were made in http (Hypertext transfer protocol), and the responses were translated by the ...
1745Moodle, Drupal, Django (and Rails)
In the 1970s, we had C and in that decade and the following one, we put together our systems in that language and its derivatives. In the 1990s, we had Perl and in that decade and the following one, we put together our systems in that language are related ones. In the 2010s, we'll have a wide range ...
1302Ruby, Ruby, Ruby. Rails, Rails, Rails.
We passed through New York on our way up from Washington DC to Albany, NY State; a 3-hour layover gave us a chance for a quick meal (there's no better city for a choice of foods), and a chance to look through a book store (there's no better country to look through the shelves for the next trend). Our ...
1050The HTML++ Metalanguage
What's the difference between a language and a metalanguage? A language is a single specification - a way of describing a series of actions or how some particular data is handled. Whereas a metalanguage is a way of specifying a series of languages to a particular pattern. An example? HTML is a language. ...
2607Answers on Ruby on Rails
What is Ruby on Rails? Ruby on Rails is a clever way of programming your web server in Ruby - it allows you to have data in databases on your website and provide very easy access tothat data through a browser, allowing your customers to see the data and you staff to see it, alter it, and add more data ...
2609Scope of variables - important to Ruby on Rails
Yesterday's Ruby on Rails training day brought home just how important it is to ensure that your Ruby variables are correctly "scoped" - that you tell Ruby if they're to be local to the method in which they are defined, to be available to all methods that run on the same objects, to all objects of a ...
1375Python v Ruby
Ruby v Python ... I've been asked for a comparison! • Both are object oriented scripting languages - or rather claim to be scripting languages, but are really compile-and-run via their own virtual machines, in just the same way as Perl and Java are. • Both are modern, Open Source languages ...
Examples from our training material
config_routes.rb   Routing for product and aisle resources - configuration
controller_application_controller.rb   Controller General Helpers
controller_floor_controller.rb   Our main shop floor controller
db_seeds.rb   Seeding data for use when application is installed
greeting.rhtml   Some Ruby at the top of a view
igot   Rails - application to display from Model, Controller and View
ilib.rb   Hello Rails World controller
models_ailse.rb   How to validate an Aisle object
models_product.rb   How to validate a Product object
views_floor_addaisle.html.erb   The view for the "add aisle" page
views_floor_addproduct.html.erb   The view for the add product page
views_floor_index.html.erb   Home page for Ruby-on-rails sample application
views_floor_stock.html.erb   View to list out what we sell, listed aisle by aisle
views_layouts_floor.html.erb   Template that encloses all pages in the application
Background information
Some modules are available for download as a sample of our material or under an Open Training Notes License for free download from [here].
Topics covered in this module
What is Ruby on Rails?
MVC (Model, view, controller) design principles.
Rails structures - WEBrick servers, URLs and embedded code.
Directory structure.
Database connections.
Creating the application, the database and tables.
First application through Scaffolds.
Validation and customising the display.
Adding a new controller.
Adding viewers and layouts.
Complete learning
If you are looking for a complete course and not just a information on a single subject, visit our Listing and schedule page.

Well House Consultants specialise in training courses in Ruby, Lua, Python, Perl, PHP, and MySQL. We run Private Courses throughout the UK (and beyond for longer courses), and Public Courses at our training centre in Melksham, Wiltshire, England. It's surprisingly cost effective to come on our public courses - even if you live in a different country or continent to us.

We have a technical library of over 700 books on the subjects on which we teach. These books are available for reference at our training centre.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2024: 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/resources/R202.html • PAGE BUILT: Sun Oct 11 14:50:09 2020 • BUILD SYSTEM: JelliaJamb