Skip to content

Commit

Permalink
Use an array instead of a regex (thoughtbot#814)
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 authored and iarie committed Jun 17, 2017
1 parent 924612b commit 966d2bf
Showing 1 changed file with 6 additions and 1 deletion.
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 966d2bf

Please sign in to comment.