Archive for January 18th, 2011

Greetings !

Today i was listening to our mentor Mr. Thyagarajan sir session on Rails

We initiated to develop a quiz application in Ruby on Rails

Here are the steps i followed to create a skeleton for Quiz application in Rails

Creating a rails project

rails new quizzproject -d mysql

Generating a Scaffold

rails generate scaffold Questnbank question:string option1:string option2:string option3:string option4:string correctanswer:integer

Edit the database.yml to include your mysql password

cd quizzproject/

gedit config/database.yml

Rake commands to create and migrate into a database

rake db:create

rake db:migrate

Run the server

rails server

Point your browser at

Click on New Questnbank to add a question and its multiple choices

Now theĀ  page @ looks as follows

In the correctanswer field give the correct option in numeric format.

For example, the answer is option 2 enter it as 2

After adding a set of questions and answers for it, the page @ looks as follows

This is the initial stage of this application

We will continue it further to make it as a quiz application in the forthcoming classes

Then i slightly explored http://www.drupalgardens.com/

By 3.50pm we gathered for SCRUM meet and i told as i was listening to our mentor class and working with quiz application in rails.


Read Full Post »