Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Modifying Rails: How do advanced users find out what needs to be changed?

I've been using Rails for a few months now, and I'm quite comfortable writing up a project & manipulating Rails to my needs, etc.

Recently I've been trying to get a little more advanced, so I've attempted to modify/add to the existing rails codebase: add new form helper methods, add a responds_to :pdf method, etc...and I've been having a lot of problems.

The difficulty is learning which code I need to modify; where that code is located, and how to ensure I don't miss related code in other files. I'm guessing there's a way people learn to do this, but at the moment I'm mostly just guessing-and-hoping.

I guess my question is, how do Rails folks go about learning where the code they need to modify is edited & the approach to editing it? It seems like it's just something you need to know from prior familiarity, but I'm guessing there has to be a simple method for understanding where (and what) to edit.

Any ideas appreciated...cheers

like image 203
PlankTon Avatar asked Mar 05 '12 12:03

PlankTon


1 Answers

I highly recommend Jose Valim's Crafting Rails Applications

You go through advanced projects, building out the types of engines and customizations that will take you to the next level in your Rails development.

From the site:

This book will help you understand Rails 3’s inner workings, including generators, template handlers, internationalization, routing, and responders.

like image 108
Jesse Wolgamott Avatar answered Oct 13 '22 09:10

Jesse Wolgamott