Archive for January 4th, 2011

Greetings !

Today i was listening to Thagu sir’s class on  ‘ Ruby on Rails ‘

I learned how to generate a scaffold in Rails

During lunch i had a talk with Rakesh about calendar application

While in development process i was stopped with some logic

Rakesh reviewed my code and suggested me to develop in other way

Then, Thagu sir’s class continued in the afternoon session

This time he taught how to integrate mysql with rails

During the installation of mysql2, i faced many problems

Thagu sir helped me to resolve it

After an hour i had a proper working of rails with mysql

By 3.45 we all our team members gathered for scrum meet

Though the development of my calendar doesnt satisfied me, im interested to create it in a way suggested by Rakesh by @ home.


Read Full Post »

In ruby the  ‘ gets ‘ method is used to get input from the user

The gets method returns the input in string format

This method attach the newline ( \n) character when receiving the input from the user

This character ( \n) is attached because of the ‘Enter’ key pressed.

To remove this character, String chomp method is used

To show chomp usage, have a look at the following screenshot

By default, the input we receive is a String

If you want to convert it into an integer make a call to_i

It is illustrated in the following screenshot



Read Full Post »