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.
orbit-4-1/app/controllers/desktop/journal_lists_controller.rb

21 lines
541 B
Ruby
Raw Normal View History

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
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|
format.html { render :layout => false}
2012-11-28 03:45:23 +00:00
end
end
end