Spreading the joy of writing software using Ruby and Rails with the world.| Write Software, Well
A root route specifies what should happen when someone visits the home page of your application. This post shows how to add a root route.| Write Software, Well
This post shows how you can redirect incoming HTTP requests using the Rails router with the help of the redirect() method.| Write Software, Well
If you want to map a resourceful route to another controller class in Rails, you can do so by passing the controller option to the resources method.| Write Software, Well
Rails allows you to nest a resource within another resource to express the logical relationship between them. This post shows how nested resources work in Rails.| Write Software, Well
You can list all the routes in your Rails application by running the `bin/rails routes` command in the terminal. or by visiting `/rails/info/routes` path on a running Rails application.| Write Software, Well
In this post, we will learn about the match method, which forms the core of the Rails router. We'll also explore how the match method works behind the scenes. Once you really understand the match method and its options, the rest of the routing methods and shorthands become very easy to understand.| Write Software, Well
This post shows how you can override the default named parameter :id in Rails, by overriding the `to_param` method on the Rails model.| Write Software, Well
This post explains named routes in Rails. We'll learn how you can name a route, and how you can use the named helper methods to generate URLs corresponding to the route.| Write Software, Well
This post shows how you can access the raw, unaltered request body using a 20-year old method in the Rails framework (from the founder of Shopify). The `raw_post` method reads the request body, and is useful for web services or API controllers that need to directly work with raw requests.| Write Software, Well
Polymorphic associations in Rails allow a single model to belong to multiple models. This article covers them in-depth. We'll start with understanding the concept of polymorphism, learn what a polymorphic association is, why we need them, how they work, and how to use them in your Rails application.| Write Software, Well