1. CSS
  2. Flash
  3. HTML
  4. Illustrator
  5. Java
  6. JavaScript
  7. Maya
  8. Photography
  9. Photoshop
  10. PHP
  11. Ruby
  12. Ruby on Rails
  13. 3ds Max

Ruby on Rails Tutorials — Refactoring

Ruby on Rails » Refactoring — almost 8 years ago
So named_scope is great. It's a quick and clear way to share common SQL fragments within your app by defining them in your models. But one aspect of scopes that might not be immediately apparent is how much logic you can strip from your controllers this way.
Ruby on Rails » Refactoring — about 9 years ago
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.
Ruby on Rails » Refactoring — about 9 years ago
Learn how to clean up your code through refactoring. This episode will show you how to move code from the view into the model to remove duplication and simplify the view.
Ruby on Rails » Refactoring — about 9 years ago
If you want to change something in the layout on a per-template basis, content_for is your answer! This allows templates to specify view code that can be placed anywhere in a layout.
Ruby on Rails » Refactoring — about 9 years ago
Move a find into the model to clean up the controllers and remove duplication. Also see how you can call these custom find methods through an association.
Ruby on Rails » Refactoring — over 10 years ago
Introduction to a couple of refactoring methods for Ruby on Rails.
Ruby on Rails » Refactoring — over 10 years ago
Learn how to refactor by taking logic out of the view and moving it to the controller, cleaning up the view in the process.
Help us out! More and more tutorials are submitted to Good-Tutorials each day. We could use your help with finding good tutorials. Mind lending a hand?