I want to take this opportunity to share some of my thoughts with you. I have purchased a copy of this book for every release including this edition. The third edition was the best in the sense that it combined basic rails skills with deeper discussions of intermediate/advanced topics. That is what more experienced people like me pay for. We don’t mind you writing for the newcomers to Rails (we were there once ourselves :)). But try to mix some of the more advanced topics in your book along with the introductory materials. I am glad to see you delaying the final release a bit. We can help shape the more advanced materials by sharing our problems/experiences.

Like this particular use/case. Layouts in Rails are very easy to implement, it is with more advanced topics like nested layouts that you go to yet another level all-together. Moreover, if things break from one release of rails to another, then it is this kind of knowledge that will help the readers of this book. I managed to get around this issue with some browsing through google reference and more specifically the tickets opened in Lighthouse.

So in a nutshell, some materials in the book which is beyond introductory will be quite useful don’t you think?

Hello Sam,
Thanks for your quick response as always. What I can do for you is to give you a link to my open source project that shows the problem. I have developed a commercial application for a health care company for them to share their documents in the cloud from all over the world. It is written in Rails 2.3.5. I upgraded it to Rails 2.3.8 and in the process of finishing up the upgrade for Rails 3.0. That will show you exactly the problem that I have run into. Actually, I will put up both Rails 2.3.8 and Rails 3.0 projects. The applications are generic since the customer was kind enough to give me permission to extract a generic implementation and put it out in the open source community.

As per the beta pdf 7.0, I downloaded it and read through it before posting my post above. The layouts coverage that you have is quite good really, but does not go far enough. What If you could address nested layouts where a controller does not use the default application.html.erb (haml) layout and uses its own layout to may be override it or supplement it then you will see the bug that I am talking about.

My target posting my Rails 3.0 code on Github is coming Monday, I will post the URL here once I am done doing it. That way you can download my code and try it for yourself? Does that work for you?
Bharat

Bharat: that’s a different topic. You found a bug in Rails 3.0, and are working with the Rails Core team to resolve it. That’s all goodness. I doubt I can add much value there. My role is in documenting Rails.

I was responding to the following statement:

The third edition was the best in the sense that it combined basic rails skills with deeper discussions of intermediate/advanced topics.</blockquote>

Here I will disagree with you. The second edition was the best in that regard, but it only covered Rails 1.x. The third edition of the book is larger than the second edition, but less comprehensive. And neither directly covered the scenario you are now having trouble with.

Meanwhile, the state of Rails documentation has dramatically improved, particularly when compared to the Rails 1.0 days. The Rails guides are pretty good. And if I see things that need to be fixed, I can talk to the people who are developing them, and they get fixed.

But — in my opinion — I still don’t think that these guides are approachable by beginners. They are a great place to go if you know how to ask the right question. But until you know the right question to ask, they are not very helpful.

Furthermore, there is enough differences between Rails 2 and Rails 3 that even people who thoroughly know Rails 2 will need a bit of re-education to once again know what the right questions are to ask.

Sam,
I think we are getting closer in understanding what each of us is talking about. Similar to this forum, I have been in contact with Ian Dees who is co-authoring the Using JRuby book. As I was going through the book, I found a few problems (after all, it is in beta :)), but more importantly, he and I engaged in an active dialog in what CONTENT could improve the book and I am delighted to see that he has followed up on it.

So, what I am saying here is that Rails should not be documented in a vacuum. It has to reflect what works and what has changed. For example, if you see the threads that I mention above, you will see that there are no specific resolutions to the deviations from the standard documentation that is provided by Edge Guides or yourself. So I am merely suggesting that you try out nested layouts and you will see that it contradicts what you are writing in the book. There is always a chance that I am wrong and I would humbly accept it when and if I am proven wrong.

Regarding my comment above “The third edition was the best in the sense that it combined basic rails skills with deeper discussions of intermediate/advanced topics.” It is entirely possible that it is a function of my learning curve too. I was intensely engaged in working on two Rails projects last year and may have found more use of the Third Edition since it was directly applicable to what I was doing then. So, that is a possibility.

I thought that you wanted to keep the more experienced developers interested, so that is where I was coming from. The shopping cart example is very good for beginners and you should keep it there. Go a bit beyond what the Edge Guides are telling us in your in-depth coverage of Rails that is based on what currently works and what does not work and what are the work arounds. For example, the behavior of content_for and yield has changed in some subtle but important ways which I found by listening to Ryan Bates and googling around. That kind of information in a book format is invaluable.. That is what I was leading up to. As you yourself point out above “Furthermore, there is enough differences between Rails 2 and Rails 3 that even people who thoroughly know Rails 2 will need a bit of re-education to once again know what the right questions are to ask.” you are right on target and I have first hand experience of that fact in trying to upgrade my project to Rails 3.

I think we are getting closer in understanding what each of us is talking about.</blockquote>

Agreed!

the behavior of content_for and yield has changed in some subtle but important ways which I found by listening to Ryan Bates and googling around</blockquote>

Thanks! Will investigate. Very helpful.

Go a bit beyond what the Edge Guides are telling us</blockquote>

While there will be instances where that is done, I’ll be upfront and will state that that there is no intent to do that in a systematic or comprehensive way.

First, “beyond the edge” is too volatile. Heck, the rate of change of Rails already stretches the limit of what can be said about basic concepts in a book intended to be printed.

More importantly, the focus of this book is on things that most people will need to know. Every section has been scrutinized from a “why do people need to know this?” perspective. In many cases, the fix was to simply add additional explanation as to why directly in the book itself. In some cases this involved pruning.

Note: none of what I have just said is in any way intended to suggest that subtle but important changes to existing methods won’t be reflected. I do intend to investigate that, and incorporate what I find back into the back. Once again, thanks for the heads up!

Sam,
I think you are doing one heck of a job with this book, and I say this sincerely, so keep up the good work.
I think Rails is invalidating the usefulness of a printed text which is a snapshot in time. In reality Rails is a fast moving “trunk” in terms of a Subversion analogy or the “master” for git.
I think the market will be a lot better served by going to a subscription model and just pushing out electronic content (pdfs etc) and updating it more frequently for the duration of subscription. Pretty similar to what Michael Hartl has done with his Rails Tutorial.
Bharat