Module: RedminePluginsHelper::Patches::Redmine::PluginPatch::Assets
- Defined in:
- lib/redmine_plugins_helper/patches/redmine/plugin_patch/assets.rb
Constant Summary collapse
- ASSETS_SUBDIRS =
%w[stylesheets javascripts images].freeze
Instance Method Summary collapse
- #add_assets_paths ⇒ Object
- #main_javascript_asset_path ⇒ Object
- #main_stylesheet_asset_path ⇒ Object
Instance Method Details
#add_assets_paths ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/redmine_plugins_helper/patches/redmine/plugin_patch/assets.rb', line 22 def add_assets_paths ASSETS_SUBDIRS.each do |assert_subdir| assets_directory = send("#{assert_subdir}_directory") next unless ::File.directory?(assets_directory) Rails.application.config.assets.paths << assets_directory end end |
#main_javascript_asset_path ⇒ Object
31 32 33 |
# File 'lib/redmine_plugins_helper/patches/redmine/plugin_patch/assets.rb', line 31 def main_javascript_asset_path find_asset(javascripts_directory, %w[js coffee js.coffee]) end |
#main_stylesheet_asset_path ⇒ Object
35 36 37 |
# File 'lib/redmine_plugins_helper/patches/redmine/plugin_patch/assets.rb', line 35 def main_stylesheet_asset_path find_asset(stylesheets_directory, %w[css scss]) end |