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"
        resources :posts
        resources :comments
      end
      namespace :widget do
        match "posts" => "posts#index"
        match "latest_post" => "posts#latest_post"
      end
    end
  end
end
