clean route table about desktop

This commit is contained in:
Rueshyna 2012-12-05 16:00:36 +08:00
parent 9041f9cd7b
commit 1be794328a
4 changed files with 4 additions and 25 deletions

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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