访问次数限制

yslnewtiku
daiao 5 years ago
parent 05391983f7
commit aaf39ec011

@ -9,7 +9,7 @@ module ElasticsearchAble
highlight: highlight_options,
body_options: body_options,
page: page,
per_page: per_page
per_page: 20
}
end
@ -37,7 +37,7 @@ module ElasticsearchAble
def per_page
per_page = params[:per_page].to_s.strip.presence || params[:limit].to_s.strip.presence
per_page.to_i <= 0 ? 20 : per_page.to_i
per_page.to_i <= 0 || per_page.to_i > 20 ? 20 : per_page.to_i
end
def page

Loading…
Cancel
Save