Hacker News new | past | comments | ask | show | jobs | submit login

I would emphatically recommend that if possible you attempt to give yourself a good grounding in ruby metaprogramming before learning rails.

It will help you greatly in understanding how and why rails works the way it does.

The rails internals contain lots and lots of "magic" stuff, which if rails is your first introduction to ruby, you will find you have trouble differentiating what is ruby and what is rails's magic.




Are there any definitive resources to understand how Rails uses metaprogramming? I once failed in an attempt to understand the scope of metaprogramming in Ruby by searching for information in the pickaxe book (but gave up way too soon to be fair).


I'm not really sure, there's an O'reilly book "Metaprogramming Ruby" (http://oreilly.com/catalog/9781934356470) which i flicked through once. It seemed to mostly dicuss how ActiveRecord works. At the point I had access to a copy I was already pretty familiar with the concepts, so can't really say how good the book actually is.

I mostly picked things up by reading code and some blog posts whenever I came across an odd idiom.


You should check out The Well Grounded Rubyist.

http://www.manning.com/black2/




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: