Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-Authored-By: Javier Julio <[email protected]>
  • Loading branch information
sgara and javierjulio committed Mar 17, 2020
1 parent bf49668 commit c7729ae
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
### Enhancements

* Extend menu to allow for nested submenus. [#5994] by [@taralbass]
* Add webpacker compatibility with config switch and installation generator. [#5855] by [@sgara]
* Add Webpacker compatibility with opt-in config switch and installation generator. [#5855] by [@sgara]

## 2.6.1 [](https://github.com/activeadmin/activeadmin/compare/v2.6.0..v2.6.1)

Expand Down
2 changes: 1 addition & 1 deletion docs/0-installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ If you're getting the error `wrong number of arguments (6 for 4..5)`, [read #270

## webpacker

Since rails 6.0, webpacker has become the default asset generator. You can opt into using webpacker for ActiveAdmin assets as well by setting `use_webpacker` at installation time or manually.
For new apps starting with Rails 6.0, Webpacker has become the default asset generator. You can **opt-in to using Webpacker for ActiveAdmin assets** as well by updating your configuration to turn on the `use_webpacker` option, either at installation time or manually.

* at active_admin installation:

Expand Down
2 changes: 1 addition & 1 deletion lib/generators/active_admin/install/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class InstallGenerator < ActiveRecord::Generators::Base

hook_for :users, default: "devise", desc: "Admin user generator to run. Skip with --skip-users"
class_option :skip_comments, type: :boolean, default: false, desc: "Skip installation of comments"
class_option :use_webpacker, type: :boolean, default: false, desc: "Use webpacker assets instead of sprockets"
class_option :use_webpacker, type: :boolean, default: false, desc: "Use Webpacker assets instead of Sprockets"

source_root File.expand_path('templates', __dir__)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -328,8 +328,8 @@ ActiveAdmin.setup do |config|

# == Webpacker
#
# By default, Active Admin uses sprocket's asset pipeline.
# You can switch to webpacker here.
# By default, Active Admin uses Sprocket's asset pipeline.
# You can switch to using Webpacker here.
#
<% unless @use_webpacker %># <% end %>config.use_webpacker = true
end
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Load Active Admin's styles into webpacker,
// Load Active Admin's styles into Webpacker,
// see `active_admin.scss` for customization.
import "../stylesheets/active_admin";

Expand Down
2 changes: 1 addition & 1 deletion spec/support/rails_template.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@

# Setup webpacker if necessary
if webpacker_app
rake "webpacker:install"
rails_command "webpacker:install"
gsub_file 'config/webpacker.yml', /^(.*)extract_css.*$/, '\1extract_css: true' if ENV['RAILS_ENV'] == 'test'
end

Expand Down

0 comments on commit c7729ae

Please sign in to comment.