We have understood the basic options available in the System
class. Now it's time to explore the System
class using our application. We will create a new page in our employee application in which we will display most of the system properties available. Follow these steps:
Create a folder
SystemExamples
in theapp
folder of your application.Create a file
controller.rb
in theSystemExamples
folder.Add the following code in
controller.rb
:require 'rho/rhocontroller' class SystemExamplesController < Rho::RhoController def index // This is no code in this action end end
We have created a controller called
SystemExample
. All the controllers in Rhodes are a subclass ofRhoController
, soSystemExample
will be a subclass ofRhoController
.Create a file
index.rb
in theSystemExamples
folder and add the following code:<div class="pageTitle"> <h1> System Examples </h1> </div> <div class="toolbar"> <div class=...