lib/ustyle/engine.rb in ustyle-1.5.8 vs lib/ustyle/engine.rb in ustyle-1.6.1

- old
+ new

@@ -15,10 +15,18 @@ initializer "ustyle.update_asset_paths", &add_paths_block initializer "ustyle.update_asset_paths", group: :assets, &add_paths_block end class Railtie < ::Rails::Railtie - initializer :setup_autoprefixer, group: :all do |app| - AutoprefixerRails.install(app.assets, *Ustyle.autoprefixer_config(app)) + if config.respond_to?(:assets) and not config.assets.nil? + config.assets.configure do |env| + AutoprefixerRails.install(env, Ustyle.autoprefixer_config) + end + else + initializer :setup_autoprefixer, group: :all do |app| + if defined? app.assets and not app.assets.nil? + AutoprefixerRails.install(app.assets, Ustyle.autoprefixer_config) + end + end end end end