Tutorial search
Tutorials
Stuff
Affiliates
Photoshop Templates
Featured Photoshop templates - professional ready to use designs for your next project.
View all templates
Layouts and content_for - Ruby on Rails tutorial

Layouts and content_for tutorial description
| Added on | 04.10.2008 |
| Total clicks | 53 |
| Tutorial Rating | 0 |
| Tutorial Difficulty | 0 |
Layouts and content_for
More cool Ruby on Rails tutorials:

Introduction to a couple of refactoring methods for Ruby on Rails.

I have put all the basic things in place and you will find it a working tutorial for Ruby on Rails 2.1.

Keep your controllers clean and forms flexible by adding virtual attributes to your model. This very powerful technique allows you to create form fields which may not directly relate to the database.

In the final part of this series you will see how to refactor your tests. Keeping tests clean is important because it will make testing easier to do in the future.

Nested resources were introduced in Rails 1.2 and are touted as the Right Way to do REST with parent-child model associations. If your app has a url that reads something like /employees?company_id=1, a switch to nested resources would cause it to read /companies/1/employees. Here's a detailed guide to developing with these new changes in mind.





