Created
May 19, 2015 12:34
-
-
Save myokoym/31862fbf8c45571a4c99 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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