Created
January 15, 2013 05:05
-
-
Save jphpsf/4536265 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
# 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 |
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
bundle exec rake deface:precompile | |
git add app/compiled_views | |
git push # as usual |
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
# 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