Skip to content

Commit

Permalink
ActionView overrides now in ConfigSystem.post_init
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesu committed Oct 3, 2008
1 parent 9c59a02 commit 0639270
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions config/environment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@
# See Rails::Configuration for more options
end

ConfigSystem.post_init

# Add new inflection rules using the following format
# (all these examples are active by default):
# Inflector.inflections do |inflect|
Expand Down
7 changes: 4 additions & 3 deletions lib/config_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ module ConfigSystem
# Courtesy of Dmytro Shteflyuk's blog post
def self.init
try_libs

end

def self.post_init
# Following for themeable assets
ActionView::Helpers::AssetTagHelper.module_eval do
def image_path(source)
Expand All @@ -40,8 +42,7 @@ def stylesheet_path(source)
compute_public_path(source, "themes/#{AppConfig.site_theme}/stylesheets", 'css')
end
alias_method :path_to_stylesheet, :stylesheet_path
end

end
end

def self.load_overrides
Expand Down

0 comments on commit 0639270

Please sign in to comment.