Skip to content

Commit

Permalink
Remove webpack auto detection from the installer
Browse files Browse the repository at this point in the history
It was introduced by #3414, but is not fully functional yet
  • Loading branch information
mshibuya committed Feb 27, 2022
1 parent 0d7012c commit 3dae7f3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/generators/rails_admin/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class InstallGenerator < Rails::Generators::Base
include Generators::Utils::InstanceMethods

argument :_namespace, type: :string, required: false, desc: 'RailsAdmin url namespace'
class_option :asset, type: :string, required: false, default: nil, desc: 'Asset delivery method [options: webpack, webpacker, sprockets]'
class_option :asset, type: :string, required: false, default: nil, desc: 'Asset delivery method [options: webpacker, sprockets]'
desc 'RailsAdmin installation generator'

def install
Expand Down Expand Up @@ -39,9 +39,7 @@ def install
def asset
return options['asset'] if options['asset']

if Rails.root.join('webpack.config.js').exist?
'webpack'
elsif defined?(Webpacker)
if defined?(Webpacker)
'webpacker'
else
'sprockets'
Expand Down

0 comments on commit 3dae7f3

Please sign in to comment.