Categories
- Active Record
- Active Resource
- Active Support
- Administration
- Ajax
- APIs
- Authentication
- Authorization
- Background Jobs
- Caching
- Code Walkthrough
- Controllers
- Debugging
- Deployment
- eCommerce
- Forms
- Mailing
- Models
- Performance
- Plugins
- Production
- Rack
- Rails 2.0
- Rails 2.1
- Rails 2.2
- Rails 2.3
- Rails 3.0
- Rails 3.1
- Rails 3.2
- Rails 4.0
- Refactoring
- Routing
- Search
- Security
- Testing
- Tools
- Views
Applied Filters:
Routing x
Generate Named Routes
This more advanced episode will show you how to dynamically generate named routes by adding a method to the map object.
(5 minutes)
Custom Routes
In this episode you will learn how to add custom routes, make some parameters optional, and add requirements for other parameters.
(7 minutes)
Model Name in URL
By default, Rails uses the model's id in the URL. What if you want to use the name of the model instead? You can change this behavior by overriding the to_param method in the model. Watch this episode for details.
(6 minutes)
Catch-all Route
Sometimes you need to add complex/dynamic routes. This is often impossible to do in routes.rb, but do not worry. It can be accomplished with a catch-all route. See how in this episode.
(5 minutes)
Custom REST Actions
REST adds many constraints. It restricts your controllers to seven actions. Normally this is okay, but sometimes you need to add your own custom actions. Learn how in this episode.
(8 minutes)
Named Routes
When you add a custom route, make it a named route so you have url helper methods to easily link to that new route. See episode for details.
(6 minutes)