Skip to content

Instantly share code, notes, and snippets.

@rterbush
Last active December 16, 2015 22:20
Show Gist options
  • Save rterbush/5506302 to your computer and use it in GitHub Desktop.
Save rterbush/5506302 to your computer and use it in GitHub Desktop.
Spree::Core::Engine.routes.prepend do
match 'news/tag/:tag', :to => 'blog_entries#tag', :as => :tag
match 'news/:year/:month/:day/:slug', :to => 'blog_entries#show', :as => :news_entry_permalink
match 'news/:year(/:month)(/:day)', :to => 'blog_entries#archive', :as => :news_archive,:constraints => {:year => /(19|20)\d{2}/, :month => /[01]?\d/, :day => /[0-3]?\d/}
match 'news/feed', :to => 'blog_entries#feed', :as => :blog_feed, :format => :rss
match 'news', :to => 'blog_entries#index', :as => :news
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment