fix coding style

This commit is contained in:
邱博亞 2023-06-04 22:28:32 +08:00
parent 4b2f23ca81
commit 2f3177ef3c
1 changed files with 4 additions and 2 deletions

View File

@ -4,7 +4,8 @@ class JournalsController < ApplicationController
params = OrbitHelper.params
categories = []
data = []
journals = Journal.order(created_at: :desc).filter_by_categories.filter_by_tags.page(OrbitHelper.params[:page_no]).per(OrbitHelper.page_data_count)
journals = Journal.order(created_at: :desc).filter_by_categories.filter_by_tags
.page(OrbitHelper.params[:page_no]).per(OrbitHelper.page_data_count)
ModuleApp.find_by(key: 'journal').categories.each do |e|
categories << [e.id.to_s, e.title]
end
@ -71,7 +72,8 @@ class JournalsController < ApplicationController
def show_list
params = OrbitHelper.params
journal = Journal.find_by(uid: params[:uid])
chapters = Chapter.where(journal_id: journal.id).order(sort_number: :asc).page(OrbitHelper.params[:page_no]).per(OrbitHelper.page_data_count)
chapters = Chapter.where(journal_id: journal.id).order(sort_number: :asc)
.page(OrbitHelper.params[:page_no]).per(OrbitHelper.page_data_count)
data = []
chapters.each do |node|
data << {