SQLTerminal.app
now available

XPath.app
now available
Want fresh tech tips in your inbox?

How To Add A Route With A Forward Slash in Params with Rails 3 Application

       

Use an asterisk in the pattern to match for everything after it. In the example below, date will be available in the params hash as params[:date].


SPB::Application.routes.draw do
  # http://example.com/calendar/2007/10 
  # params[:date] => "2007/10"
  match '/calendar/*date' => 'events#index', as: 'month'
end
Tagged w/ #ruby on rails #routes #code samples

Apps I've Built

XPath Expression Editor
Practice and improve your XPath skills with XPath Editor
Click to buy on the App Store
Photo Location Changer
Easily change the location on your photos and videos
Click here for more info about the app
Photo Date Changer
Easily change the dates and times on your photos and videos
Click here for more info about the app
VocabReminder
English dictionary with notifications so you won't forget what you're studying!
Click here for more info about the app
VocabQuiz
The app that quizzes and scores you on your vocabulary!
Click here for more info about the app