Skip to content

Instantly share code, notes, and snippets.

@myokoym
Created May 19, 2015 12:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save myokoym/31862fbf8c45571a4c99 to your computer and use it in GitHub Desktop.
Save myokoym/31862fbf8c45571a4c99 to your computer and use it in GitHub Desktop.
diff --git config.ru config.ru
index 1cbc50c..ba8ecbd 100644
--- config.ru
+++ config.ru
@@ -21,6 +21,22 @@ lib_dir = File.join(base_dir, "lib")
$LOAD_PATH.unshift(lib_dir)
require "feedcellar/web/app"
+module Kaminari::Helpers
+ module SinatraHelpers
+ class ActionViewTemplateProxy
+ def url_for(params)
+ extra_params = {}
+ if page = params[@param_name] and page != 1
+ extra_params[@param_name] = page
+ end
+ query = @current_params.merge(extra_params)
+ #@current_path + (query.empty? ? '' : "?#{query.to_query}")
+ "/feedcellar-demo/search" + (query.empty? ? '' : "?#{query.to_query}")
+ end
+ end
+ end
+end
+
ENV["FEEDCELLAR_HOME"] ||= File.join(base_dir, ".feedcellar")
if ENV["FEEDCELLAR_ENABLE_CACHE"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment