5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# File 'app/controllers/homeland/jobs/jobs_controller.rb', line 5
def index
@suggest_topics = Topic.where(node_id: @node.id).suggest.limit(3)
suggest_topic_ids = @suggest_topics.map(&:id)
@topics = Topic.where(node_id: @node.id)
@topics = @topics.without_ban if @topics.respond_to?(:without_ban)
@topics = @topics.where.not(id: suggest_topic_ids) if suggest_topic_ids.count > 0
@topics = @topics.last_actived.includes(:user).page(params[:page])
@topics = @topics.where("title ilike ?", "%[#{params[:location]}]%") if params[:location]
@page_title = '招聘'
render '/topics/index' if stale?(etag: [@node, @suggest_topics, @topics], template: '/topics/index')
end
|