clean route table about desktop

This commit is contained in:
Rueshyna 2012-12-05 16:00:36 +08:00 committed by chris
parent 6c33d353ba
commit 4ae7ac8388
4 changed files with 4 additions and 25 deletions

View File

@ -8,15 +8,6 @@ class Desktop::CoAuthorsController < ApplicationController
end end
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 def new
@co_author = CoAuthor.new @co_author = CoAuthor.new
@co_author_relations = CoAuthorRelation.all @co_author_relations = CoAuthorRelation.all

View File

@ -1,5 +1,4 @@
class Desktop::JournalListsController < ApplicationController class Desktop::JournalListsController < ApplicationController
def index def index
level_types = JournalLevelType.all level_types = JournalLevelType.all
all_journal_lists = WritingJournal.where(create_user_id: current_user.id) all_journal_lists = WritingJournal.where(create_user_id: current_user.id)

View File

@ -1,6 +1,4 @@
class Desktop::JournalPagesController < ApplicationController class Desktop::JournalPagesController < ApplicationController
#before_filter :check_for_cancel, :only => [:create, :update]
def index def index
@writing_journal = WritingJournal.where(create_user_id: current_user.id) @writing_journal = WritingJournal.where(create_user_id: current_user.id)
@level_types = JournalLevelType.all @level_types = JournalLevelType.all
@ -10,9 +8,6 @@ class Desktop::JournalPagesController < ApplicationController
end end
end end
def show
end
def new def new
@writing_journal = WritingJournal.new @writing_journal = WritingJournal.new
@level_types = JournalLevelType.all @level_types = JournalLevelType.all
@ -109,10 +104,4 @@ class Desktop::JournalPagesController < ApplicationController
render json: JSON.pretty_generate(data) render json: JSON.pretty_generate(data)
end end
private
def check_for_cancel
if params[:commit] == "Cancel"
end
end
end end

View File

@ -180,10 +180,10 @@ Orbit::Application.routes.draw do
match '/widget_layout' => 'desktop#widget_layout' match '/widget_layout' => 'desktop#widget_layout'
match '/temp_func/'=>'desktop#temp_func' match '/temp_func/'=>'desktop#temp_func'
resources :journal_pages resources :journal_pages, except: :show
resources :journal_lists resources :journal_lists, only: :index
resources :co_authors resources :co_authors, except: :show
resources :co_author_relations resources :co_author_relations, except: :show
end end
# namespace :desktop_publications do # namespace :desktop_publications do