Skip to content

Commit

Permalink
use an array instead of a regex
Browse files Browse the repository at this point in the history
Rails calls String#start_with? on the precompile assets, yet Regex doesn't implement this method leading to an error.
  • Loading branch information
BenMorganIO committed Apr 4, 2017
1 parent e5c6446 commit ee1880b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Empty file.
7 changes: 6 additions & 1 deletion lib/administrate/engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ class Engine < ::Rails::Engine
@@javascripts = []
@@stylesheets = []

Engine.config.assets.precompile << /\.(?:svg)\z/
Engine.config.assets.precompile << %w(
administrate/cancel.svg
administrate/dropdown.svg
administrate/search.svg
administrate/sort_arrow.svg
)

def self.add_javascript(script)
@@javascripts << script
Expand Down

0 comments on commit ee1880b

Please sign in to comment.