diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-11-28 11:38:20 +0200 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-11-28 11:38:20 +0200 |
commit | 33aea41708b94f480b6eaad760e26abe17a37dfa (patch) | |
tree | a1e0620cb16192cbdb5ec3a36041a9a94a348194 /app/controllers/application_controller.rb | |
parent | 70c2e1d773291b4854da5a3b479baa352428bb4b (diff) | |
download | gitlab-ce-33aea41708b94f480b6eaad760e26abe17a37dfa.tar.gz |
Drop rjs from Infinite scrolling
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r-- | app/controllers/application_controller.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 68ea636ccfe..94ce8e0616c 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -174,4 +174,18 @@ class ApplicationController < ActionController::Base filters = cookies['event_filter'].split(',') if cookies['event_filter'].present? @event_filter ||= EventFilter.new(filters) end + + # JSON for infinite scroll via Pager object + def pager_json(partial, count) + html = render_to_string( + partial, + layout: false, + formats: [:html] + ) + + render json: { + html: html, + count: count + } + end end |