Home > Articles > Programming > Ruby

  • Print
  • + Share This
This chapter is from the book

This chapter is from the book

Conclusion

The first half of the chapter helped you to fully understand generic routing based on map.connect rules and how the routing system has two purposes:

  • Recognizing incoming requests and mapping them to a corresponding controller action, along with any additional variable receptors
  • Recognizing URL parameters in methods such as link_to and matching them up to a corresponding route so that proper HTML links can be generated

We built on our knowledge of generic routing by covering some advanced techniques such as using regular expressions and globbing in our route definitions.

Finally, before moving on, you should make sure that you understand how named routes work and why they make your life easier as a developer by allowing you to write more concise view code. As you'll see in the next chapter, when we start defining batches of related named routes, we're on the cusp of delving into REST.

  • + Share This
  • 🔖 Save To Your Account