Created
January 29, 2009 13:39
-
-
Save svenfuchs/54542 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
ActionController::Routing::Routes.draw do |map| | |
map.from_plugins | |
map.filter 'force_html' | |
end |
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
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