Skip to content

Commit

Permalink
Fixes #1845 - Default assets registered twice by ActiveAdmin.setup
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrshannon committed Mar 7, 2013
1 parent 3c906d1 commit d32f841
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/active_admin/asset_registration.rb
Original file line number Diff line number Diff line change
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

0 comments on commit d32f841

Please sign in to comment.