#routes.rb
get "/:year(/:month(/:day))(/:genre)" => "archives#index", :constraints => { :year => /\d{4}/, :month => /\d{2}/, :day => /\d{2}/ }
#archives_controller.rb
def index
@articles = Article.all(params[:year, :month, :day, :genre],:order => "created_at DESC")
#routes.rb
get "/:year(/:month(/:day))(/:genre)