Skip to content

Instantly share code, notes, and snippets.

@jphpsf
Created January 15, 2013 05:05
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 jphpsf/4536265 to your computer and use it in GitHub Desktop.
Save jphpsf/4536265 to your computer and use it in GitHub Desktop.
# in config/application.rb
# ... snip (bunch of requires) ...
module MyApp
class Application < Rails::Application
# ... snip (config)...
# Make sure deface ignores precompiled views in development
initializer "deface.precompile.remove_inject_views", :before => :add_view_paths do |app|
app.paths["app/views"].delete "app/compiled_views" if Rails.env == "development"
end
end
end
bundle exec rake deface:precompile
git add app/compiled_views
git push # as usual
# in config/environments/production.rb
CaliCraft::Application.configure do
# ... snip (more config) ...
# Disable deface override as we use precompile
config.deface.enabled = false unless ENV['RAILS_GROUPS'] == 'assets'
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment