Skip to content

Commit

Permalink
It seems it's a good idea to register built-in active_admin/print.css…
Browse files Browse the repository at this point in the history
… stylesheet in active_admin.rb initializer.

I moved it out from ActiveAdmin::Views::Pages::Base#build_active_admin_head method.
  • Loading branch information
tanraya committed Feb 28, 2012
1 parent c542932 commit 34cd116
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions Gemfile
Expand Up @@ -26,6 +26,7 @@ group :development, :test do
gem 'yard'
gem 'rdiscount' # For yard
gem 'rails-i18n' # Gives us default i18n for many languages
gem 'therubyracer'
end

group :test do
Expand Down
2 changes: 1 addition & 1 deletion lib/active_admin/views/pages/base.rb
Expand Up @@ -25,7 +25,7 @@ def build_active_admin_head
active_admin_application.stylesheets.each do |style|
text_node(stylesheet_link_tag(style.path, style.options).html_safe)
end
link :href => stylesheet_path('active_admin/print.css'), :media => "print", :rel => "stylesheet", :type => "text/css"

active_admin_application.javascripts.each do |path|
script :src => javascript_path(path), :type => "text/javascript"
end
Expand Down
Expand Up @@ -120,7 +120,8 @@ ActiveAdmin.setup do |config|
#
# To load a stylesheet:
# config.register_stylesheet 'my_stylesheet.css'
#
config.register_stylesheet 'active_admin/print.css', :media => :print

# You can provide an options hash for more control, which is passed along to stylesheet_link_tag():
# config.register_stylesheet 'my_print_stylesheet.css', :media => :print
#
Expand Down

0 comments on commit 34cd116

Please sign in to comment.