Merge pull request #1115 from ahorek/ruby23

ruby 2.3 compatibility
This commit is contained in:
Karel Picman 2020-05-08 06:59:08 +02:00 committed by GitHub
commit eb3c41f118
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,13 +26,13 @@ module RedmineDmsf
# TODO: *.css are twice there
def view_layouts_base_html_head(context={})
return unless context[:controller].class.name.match?(/^(Dmsf|Projects)/)
return unless /^(Dmsf|Projects)/.match?(context[:controller].class.name)
meta = "\n".html_safe + stylesheet_link_tag('redmine_dmsf.css', plugin: :redmine_dmsf) +
"\n".html_safe + stylesheet_link_tag('select2.min.css', plugin: :redmine_dmsf) +
"\n".html_safe + javascript_include_tag('select2.min.js', plugin: :redmine_dmsf, defer: true) +
"\n".html_safe + javascript_include_tag('redmine_dmsf.js', plugin: :redmine_dmsf, defer: true) +
"\n".html_safe + javascript_include_tag('attachments_dmsf.js', plugin: :redmine_dmsf, defer: true)
if defined?(EasyExtensions) && context[:controller].class.name.match?(/^Dmsf/)
if defined?(EasyExtensions) && /^Dmsf/.match?(context[:controller].class.name)
meta << "\n".html_safe + javascript_include_tag('context_menu', 'application', defer: true)
end
meta