We are going to create set an application to manage a set of
organic molecules.
Issue the command line:
C:\ruby> rails organics
1. Crating organics Rails Application:
This command creates automatically the related organics
directory:
subdirectory of C:\ruby>, as it did "demo" directory creation. At
this point, "organics application" is an empty Rails application.
Run the "organics" server under this command line:
C:\ruby\organics\> ruby script/server
That will start your WEBrick web server.
Check at :http://localhost:3000/;
especially the line: Application root C:/ruby/organics.
2. Notations:
project name: Organic
model: Hydrocarbon
controller: Hydrocarbon
class: Hydrocarbon
database table: hydrocarbons
object: row -> its properties: columns (as compound)
Object @hydrocarbon = Hydrocarbon.find(params[:id])
Set of Objects = array : @hydrocarbons = Hydrocarbon.find(:all)
@hydrocarbon.compound - extracts the object's value of compound
http://localhost:3000/hydrocarbon/list/x
hydrocarbon:project name
list: method
x: parameter (id)
|