can add relation between co-author

This commit is contained in:
Rueshyna authored and chris committed 2012-12-04 00:31:06 +08:00
1 parent 5dabfe9319
commit 7822ffc33d
18 files changed
+350 -77

No files matched your search

@@ -1,6 +1,5 @@
class Desktop::JournalListsController < ApplicationController
# GET /desktop/journal_lists
# GET /desktop/journal_lists.json
def index
level_types = JournalLevelType.all
all_journal_lists = WritingJournal.where(create_user_id: current_user.id)
@@ -18,76 +17,4 @@ class Desktop::JournalListsController < ApplicationController
format.html { render :layout => false}
end
end
=begin
# GET /desktop/journal_lists/1
# GET /desktop/journal_lists/1.json
def show
@desktop_journal_list = Desktop::JournalList.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.json { render json: @desktop_journal_list }
end
end
# GET /desktop/journal_lists/new
# GET /desktop/journal_lists/new.json
def new
@desktop_journal_list = Desktop::JournalList.new
respond_to do |format|
format.html # new.html.erb
format.json { render json: @desktop_journal_list }
end
end
# GET /desktop/journal_lists/1/edit
def edit
@desktop_journal_list = Desktop::JournalList.find(params[:id])
end
# POST /desktop/journal_lists
# POST /desktop/journal_lists.json
def create
@desktop_journal_list = Desktop::JournalList.new(params[:desktop_journal_list])
respond_to do |format|
if @desktop_journal_list.save
format.html { redirect_to @desktop_journal_list, notice: 'Journal list was successfully created.' }
format.json { render json: @desktop_journal_list, status: :created, location: @desktop_journal_list }
else
format.html { render action: "new" }
format.json { render json: @desktop_journal_list.errors, status: :unprocessable_entity }
end
end
end
# PUT /desktop/journal_lists/1
# PUT /desktop/journal_lists/1.json
def update
@desktop_journal_list = Desktop::JournalList.find(params[:id])
respond_to do |format|
if @desktop_journal_list.update_attributes(params[:desktop_journal_list])
format.html { redirect_to @desktop_journal_list, notice: 'Journal list was successfully updated.' }
format.json { head :ok }
else
format.html { render action: "edit" }
format.json { render json: @desktop_journal_list.errors, status: :unprocessable_entity }
end
end
end
# DELETE /desktop/journal_lists/1
# DELETE /desktop/journal_lists/1.json
def destroy
@desktop_journal_list = Desktop::JournalList.find(params[:id])
@desktop_journal_list.destroy
respond_to do |format|
format.html { redirect_to desktop_journal_lists_url }
format.json { head :ok }
end
end
=end
end