diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-12 21:06:30 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-12 21:06:30 +0000 |
commit | 6e3880e2bb5a404467c64edc916d9edf7556d09d (patch) | |
tree | 95cfb0de65623b7015b9d1a8c9ebb559a9358033 /app/helpers/application_helper.rb | |
parent | 6d31b8f052d30b7e55128d17b66bceed8c6065a9 (diff) | |
download | gitlab-ce-6e3880e2bb5a404467c64edc916d9edf7556d09d.tar.gz |
Add latest changes from gitlab-org/gitlab@master
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 |