26 lines
699 B
Ruby
26 lines
699 B
Ruby
|
Rails.application.routes.draw do
|
||
|
|
||
|
namespace :panel do
|
||
|
namespace :new_blog do
|
||
|
namespace :back_end do
|
||
|
root :to => "posts#index"
|
||
|
resources :posts
|
||
|
resources :comments
|
||
|
end
|
||
|
namespace :front_end do
|
||
|
root :to => "posts#index"
|
||
|
match "show/:id" => "posts#show" ,:as => :post
|
||
|
match "comments" => "comments#create",:as => :comments
|
||
|
end
|
||
|
namespace :widget do
|
||
|
root :to => "posts#index"
|
||
|
match "latest_post" => "posts#latest_post"
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
|
||
|
# match "appfront/blog/front_end/show/:id" => "posts#frontend_show" ,:as => :appfront_blog_show
|
||
|
|
||
|
match "/appfront/*path" => redirect("/panel/*path")
|
||
|
end
|