Ok, after quite some hours of work I got a grasp of both Ruby and Rails’ basics. In addition to the links I already mentioned, I found the RubyOnRails API also very useful.
Some results:
I took an extra 20 minutes to add the logo. Only because I was making screen shots for my blog π
I’m really tired, so some quick notes.
Before deciding on wether I really want to dig deep into RoR, I want to evaluate Subway, a framework insprired by Rails. It’s written in Python, which gives it a large advantage over Ruby on Rails. Sorry about that π
Update 2006-01-09 23:01h: Colleagues pointed me to TurboGears. Another python framework “much like Rails”. My todo list is growing…
January 9, 2006 at 07:02 |
Hum … Glad to see you like RoR …
However, I do not agree with the term ‘perlish’ regarding variables naming … In Perl, sigils describe the type of the variable (list, hash, scalar …) although in Ruby they just determine the scope of the variable …
Moreover in your example, you just give 2 different variables use: @product and product. The 2 other ones are either a Symbol and a string, evaluating the product variable …
My .2 $
January 9, 2006 at 23:11 |
Merci Frederick, I will invest your .2 $ and hope to be able to give you back much more some day.
Indeed it differs from Perl. It still looks perlish though π
No, you’re right. the ‘:product’ puzzled me. But it’s not a variable. Maybe you could point me to a place where the ‘:…’ is explained. Google ignores ‘:’ in my query for Rails wisdom.
The sentence about referencing a product will be corrected once I really understand why it is incorrect.
Thanks again for the feedback!
January 10, 2006 at 01:54 |
:something is a symbol in ruby. there’s guaranteed to be only one object for a symbol. comparing symbols is faster than comparing strings. you might wanna check out http://glu.ttono.us/articles/2005/08/19/understanding-ruby-symbols and other “ruby symbols” google-ables. technically, you can use anything for a key, but hashes in rails usually use symbols for keys.