Module: RedminePluginsHelper::Patches::Redmine::Plugin::Assets
- Defined in:
- lib/redmine_plugins_helper/patches/redmine/plugin/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
20 21 22 23 24 25 26 27 |
# File 'lib/redmine_plugins_helper/patches/redmine/plugin/assets.rb', line 20 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
29 30 31 |
# File 'lib/redmine_plugins_helper/patches/redmine/plugin/assets.rb', line 29 def main_javascript_asset_path find_asset(javascripts_directory, %w[js coffee js.coffee]) end |
#main_stylesheet_asset_path ⇒ Object
33 34 35 |
# File 'lib/redmine_plugins_helper/patches/redmine/plugin/assets.rb', line 33 def main_stylesheet_asset_path find_asset(stylesheets_directory, %w[css scss]) end |