From 1be794328a06bfb586332ba9607083a9c4cf79dd Mon Sep 17 00:00:00 2001 From: Rueshyna Date: Wed, 5 Dec 2012 16:00:36 +0800 Subject: [PATCH] clean route table about desktop --- app/controllers/desktop/co_authors_controller.rb | 9 --------- app/controllers/desktop/journal_lists_controller.rb | 1 - app/controllers/desktop/journal_pages_controller.rb | 11 ----------- config/routes.rb | 8 ++++---- 4 files changed, 4 insertions(+), 25 deletions(-) diff --git a/app/controllers/desktop/co_authors_controller.rb b/app/controllers/desktop/co_authors_controller.rb index c027a162..91390071 100644 --- a/app/controllers/desktop/co_authors_controller.rb +++ b/app/controllers/desktop/co_authors_controller.rb @@ -8,15 +8,6 @@ class Desktop::CoAuthorsController < ApplicationController end end - def show - @co_author = CoAuthor.find(params[:id]) - - respond_to do |format| - format.html { redirect_to desktop_co_authors_url, :layout => false } - format.json { render json: @co_author } - end - end - def new @co_author = CoAuthor.new @co_author_relations = CoAuthorRelation.all diff --git a/app/controllers/desktop/journal_lists_controller.rb b/app/controllers/desktop/journal_lists_controller.rb index 4ced5055..2667a5a7 100644 --- a/app/controllers/desktop/journal_lists_controller.rb +++ b/app/controllers/desktop/journal_lists_controller.rb @@ -1,5 +1,4 @@ class Desktop::JournalListsController < ApplicationController - def index level_types = JournalLevelType.all all_journal_lists = WritingJournal.where(create_user_id: current_user.id) diff --git a/app/controllers/desktop/journal_pages_controller.rb b/app/controllers/desktop/journal_pages_controller.rb index 5775be0a..8a2312b8 100644 --- a/app/controllers/desktop/journal_pages_controller.rb +++ b/app/controllers/desktop/journal_pages_controller.rb @@ -1,6 +1,4 @@ class Desktop::JournalPagesController < ApplicationController - #before_filter :check_for_cancel, :only => [:create, :update] - def index @writing_journal = WritingJournal.where(create_user_id: current_user.id) @level_types = JournalLevelType.all @@ -10,9 +8,6 @@ class Desktop::JournalPagesController < ApplicationController end end - def show - end - def new @writing_journal = WritingJournal.new @level_types = JournalLevelType.all @@ -109,10 +104,4 @@ class Desktop::JournalPagesController < ApplicationController render json: JSON.pretty_generate(data) end - private - - def check_for_cancel - if params[:commit] == "Cancel" - end - end end diff --git a/config/routes.rb b/config/routes.rb index 2a9d98fc..32d8430a 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -180,10 +180,10 @@ Orbit::Application.routes.draw do match '/widget_layout' => 'desktop#widget_layout' match '/temp_func/'=>'desktop#temp_func' - resources :journal_pages - resources :journal_lists - resources :co_authors - resources :co_author_relations + resources :journal_pages, except: :show + resources :journal_lists, only: :index + resources :co_authors, except: :show + resources :co_author_relations, except: :show end # namespace :desktop_publications do