Sha256: 83d47d662b0c6a91bd262f61516a60dd42a4b5a22d5e95826b02cf127cb89915
Contents?: true
Size: 1.33 KB
Versions: 2
Compression:
Stored size: 1.33 KB
Contents
HomesteadingPublisher::Engine.routes.draw do get "/posts/new", to: "posts#new", as: "new_post" post "/posts", to: "posts#create", as: "posts" post "/posts/:year/:month/:day", to: "posts#create", constraints: { year: /\d{4}/, month: /\d{1,2}/, day: /\d{1,2}/ } get "/posts/:year/:month/:day/:slug", to: "posts#show", constraints: { year: /\d{4}/, month: /\d{1,2}/, day: /\d{1,2}/ }, as: "post" get "/posts/:year/:month/:day/:slug/edit", to: "posts#edit", constraints: { year: /\d{4}/, month: /\d{1,2}/, day: /\d{1,2}/ }, as: "edit_post" patch "/posts/:year/:month/:day/:slug", to: "posts#update", constraints: { year: /\d{4}/, month: /\d{1,2}/, day: /\d{1,2}/ } delete "/posts/:year/:month/:day/:slug", to: "posts#destroy", constraints: { year: /\d{4}/, month: /\d{1,2}/, day: /\d{1,2}/ } # atom feed get "/posts/feed", to: "posts#index", defaults: { format: "atom" }, as: :feed # Pagination get "/posts/page/1", to: redirect("/") get "/posts/page", to: redirect("/") get "/posts/page/:page", to: "posts#index" get "(/posts)(/:year)(/:month)(/:day)", to: "posts#index" end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
homesteading_publisher-0.2.2 | config/routes.rb |
homesteading_publisher-0.2.1 | config/routes.rb |