Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #1845 - Default assets registered twice by ActiveAdmin.setup #1974

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/active_admin/asset_registration.rb
Expand Up @@ -4,7 +4,8 @@ module AssetRegistration
# Stylesheets

def register_stylesheet(*args)
stylesheets << ActiveAdmin::Stylesheet.new(*args)
tmp = ActiveAdmin::Stylesheet.new(*args)
stylesheets << tmp unless stylesheets.include? tmp
end

def stylesheets
Expand All @@ -19,7 +20,7 @@ def clear_stylesheets!
# Javascripts

def register_javascript(name)
javascripts << name
javascripts << name unless javascripts.include? name
end

def javascripts
Expand Down