Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ActionController::Routing::Routes.draw do |map|
map.from_plugins
map.filter 'force_html'
end
ActionController::Dispatcher.to_prepare do
require 'application' # need to do this so we can access BaseController
BaseController.class_eval do
include UrlHistory::Tracking
tracks_url_history
end
Content.class_eval do
def update_url_history_params(params)
if params.has_key?(:year)
params.merge self.full_permalink
elsif params.has_key?(:permalink)
params.merge :permalink => self.permalink
else
params
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment