Created
November 4, 2013 09:30
-
-
Save the-teacher/7300203 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TheComments::Engine.routes.draw do | |
resources :comments do | |
member do | |
post :to_spam | |
post :to_draft | |
post :to_published | |
delete :to_deleted | |
end | |
collection do | |
get :manage | |
get :my_draft | |
get :my_published | |
get :my_comments | |
get :total_draft | |
get :total_published | |
get :total_deleted | |
get :total_spam | |
get :draft | |
get :published | |
get :deleted | |
get :spam | |
end | |
end | |
end | |
App::Application.routes.draw do | |
root 'posts#index' | |
get "autologin/:id" => "users#autologin", as: :autologin | |
# Login system | |
get "login" => "sessions#new", as: :login | |
delete "logout" => "sessions#destroy", as: :logout | |
get "signup" => "users#new", as: :signup | |
post "sessions" => "sessions#create", as: :sessions | |
resources :posts | |
mount TheComments::Engine => '/' | |
end | |
######################## | |
the_comments_engine / TheComments::Engine | |
Routes for TheComments::Engine: | |
to_spam_comment POST /comments/:id/to_spam(.:format) comments#to_spam | |
to_draft_comment POST /comments/:id/to_draft(.:format) comments#to_draft | |
to_published_comment POST /comments/:id/to_published(.:format) comments#to_published | |
to_deleted_comment DELETE /comments/:id/to_deleted(.:format) comments#to_deleted | |
manage_comments GET /comments/manage(.:format) comments#manage | |
my_draft_comments GET /comments/my_draft(.:format) comments#my_draft | |
my_published_comments GET /comments/my_published(.:format) comments#my_published | |
my_comments_comments GET /comments/my_comments(.:format) comments#my_comments | |
total_draft_comments GET /comments/total_draft(.:format) comments#total_draft | |
total_published_comments GET /comments/total_published(.:format) comments#total_published | |
total_deleted_comments GET /comments/total_deleted(.:format) comments#total_deleted | |
total_spam_comments GET /comments/total_spam(.:format) comments#total_spam | |
draft_comments GET /comments/draft(.:format) comments#draft | |
published_comments GET /comments/published(.:format) comments#published | |
deleted_comments GET /comments/deleted(.:format) comments#deleted | |
spam_comments GET /comments/spam(.:format) comments#spam | |
comments GET /comments(.:format) comments#index | |
POST /comments(.:format) comments#create | |
new_comment GET /comments/new(.:format) comments#new | |
edit_comment GET /comments/:id/edit(.:format) comments#edit | |
comment GET /comments/:id(.:format) comments#show | |
PATCH /comments/:id(.:format) comments#update | |
PUT /comments/:id(.:format) comments#update | |
DELETE /comments/:id(.:format) comments#destroy | |
###################### | |
undefined method `comments_path' for #<#<Class:0x9d5c54c>:0x9b67854> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment