diff options
Diffstat (limited to 'app/helpers/application_helper.rb')
-rw-r--r-- | app/helpers/application_helper.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index ecaeb7060c8..dcd7434b9ea 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -324,6 +324,15 @@ module ApplicationHelper } end + def asset_to_string(name) + app = Rails.application + if Rails.configuration.assets.compile + app.assets.find_asset(name).to_s + else + controller.view_context.render(file: File.join('public/assets', app.assets_manifest.assets[name])) + end + end + private def appearance |