Scaffolding in Ruby on Rails


Ruby on Rails is the new Web development programming Language. It seems very good. Even I am new to it and I am learning it from Wrox and Agile Ebook. ROR is the programming language which consists of parts as Model, Controllers, Views, Actions.
Recently I was trying a Example given in the book. It consists of a scaffold method which is to be used in a controller which has syntax as:
class AdminController < ApplicationController
scaffold :product
end

here ‘admin’ is the controller used and product is the model which is to be created and database is ‘products’

This is dynamic scaffold method. But googling on internet and ruby forums I got to know that in Rails2.0 static scaffold method is no more used. Only dynamic method is used.

So just go into the rails application folder and type the following command for the above scaffold, So here it becomes static scaffold:

ruby script/generate scaffold product title:string description:text image_url:string

So here model is ‘product’ and table named ‘products’ is created with the parameters and columns as written after product in above command.
I will put a detailed post with all commands and step wise explaination.
But Important is if you get the Agile Web development with ROR 3rd edition(Beta will also do) it has correct steps to be followed, but in Wrox and Agile 2nd edition the steps are explained using dynamic scaffold method.

Advertisements

Reliance Wireless


i guyz. So here I am again with a new post. I have been busy with my training and so no time to post. Though being free bcos of weekend, I thought of downloading somethings from internet and i was very happy with the download speed which i was getting.

I have been using Reliance Broadband+ since last 2 months. Its little costly, but the service and connection i am getting is worth it, as you can see in the pic. After using You Telecom(Pune) and BSNL(Pune) wired broadband service, this Reliance Broadband plus that too wireless is extremely fabulous. and excellent connectivity.
The software I am using for downloading is Bit Comet. Sometimes, i feel software also matter to get good download speed. So, if your plannin to get some connection. just give reliance a thought.. 🙂