Saturday, December 22, 2012

Second Day of Learning Rails

When I wake up early in the morning, my eyes feel hot and watering all the time. The reason is I slept only 4 hour before. Is it okay to sleep 4 hour a day? actually there are a lot of person who did that but have no effect on their eyes. It's like nothing happened. like usual. the day with enough sleep. Unfortunately its not like me at all. I need more time... everyone who reads this should do the same. Resting yourselves with the time that comfort you.
That was the advice of the day. lol. 
The next one that I would like to talk about is about Rails that I learn today. Its easy to guess, the thing that I learn is almost as easy as pie thing for some people.. haaha.. 

Let me make the Ordered List for what I've done today.
  1. Learning how to linking some letter to another page. Its a common thing if we use <a> </a> anchore right?. In rails, we use a method that we called link_to. The standar signatur that we can use is link_to body, url (i.e. link_to "Home", page_home_path). Its awesome of course, but there is something more awesome than that, and that method is, link_to_unless_current body url. The method is to make the link only if the URI is not the same as url that we passed to the parameter. 
  2. How to make a Controller. Its easy, make a command on cmd prompt using generate. rails generate controller name_of_controller name_of_action name_of_action . . . This command will automatically make some files that we can use to develop our program
  3.  Helpers. I still don't really get it, but it won't take a long time to know the whole thing about helpers. The first thing that I know is Helpers is some kind of thing that can help Controller to make some action as module on a controller. 
  4. The best source of method on Rails is off course Api Rails Site 
Okay then, that was the only thing that I can grasp today. hope that tomorrow will be better.. :D

the Last thing that I wanna share today is some random photos that I get from the net..
here it is.. 

It's cute, I hope that it fall. lol


No comments:

Post a Comment