Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
wants to merge 1 commit into from

4 participants

@michaelrshannon

Implements changes suggested in issue #1845 comments

@macfanatic

Will you please add a spec for this in spec/unit/asset_registration_spec.rb?

@exviva

Cool! This is related: ejholmes/active_admin_editor#20

@seanlinsley
Owner

Our Travis builds on master are now green (as of 166bc46). Please rebase your PR on the current master:

# Expectations: "upstream" is gregbell's GitHub repo and "origin" is your fork

# Rebase your fork's master branch with the latest upstream changes
git checkout master
git pull --rebase upstream master
git push origin master

# Rebase your feature branch with the latest upstream changes
git checkout your_feature_branch
git pull --rebase upstream master
git push origin your_feature_branch # note that you may need to use -f
@seanlinsley
Owner

Ping @michaelrshannon; this still needs tests!

@michaelrshannon

Thanks - been away, will deal with this week.

@seanlinsley
Owner

It's been two weeks now :P

@seanlinsley
Owner

Closing this in favor of #2139

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/active_admin/asset_registration.rb
View
5 lib/active_admin/asset_registration.rb
@@ -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
@@ -19,7 +20,7 @@ def clear_stylesheets!
# Javascripts
def register_javascript(name)
- javascripts << name
+ javascripts << name unless javascripts.include? name
end
def javascripts
Something went wrong with that request. Please try again.