Skip to content

Instantly share code, notes, and snippets.

@jswanner
Created July 9, 2011 17:16
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 jswanner/1073762 to your computer and use it in GitHub Desktop.
Save jswanner/1073762 to your computer and use it in GitHub Desktop.
Add before_filter to pages controller from refinery engine
require 'refinerycms'
module Refinery
module MyEngine
class Engine < Rails::Engine
refinery.after_inclusion do
::PagesController.class_eval do
before_filter :check_some_stuff, :only => :show
def check_some_stuff
end
end
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment