This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
2012-11-28 03:45:23 +00:00
|
|
|
class Desktop::JournalListsController < ApplicationController
|
2012-12-03 04:10:45 +00:00
|
|
|
|
2012-11-28 03:45:23 +00:00
|
|
|
def index
|
2012-11-30 15:50:46 +00:00
|
|
|
level_types = JournalLevelType.all
|
|
|
|
all_journal_lists = WritingJournal.where(create_user_id: current_user.id)
|
|
|
|
all_journal_lists = all_journal_lists.map do |j|
|
|
|
|
[ j.journal_title,
|
|
|
|
j.journal_level_type_ids.map do |type|
|
|
|
|
level_types.find(type).title
|
|
|
|
end.join(",")
|
|
|
|
].join(" -- ")
|
|
|
|
end
|
|
|
|
|
|
|
|
@journal_lists = all_journal_lists.uniq
|
2012-11-28 03:45:23 +00:00
|
|
|
|
|
|
|
respond_to do |format|
|
2012-11-30 15:50:46 +00:00
|
|
|
format.html { render :layout => false}
|
2012-11-28 03:45:23 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|