lib/active_admin/views/pages/base.rb in andrewroth_activeadmin-0.3.4 vs lib/active_admin/views/pages/base.rb in andrewroth_activeadmin-0.3.4.1

- old
+ new

@@ -21,12 +21,12 @@ def build_active_admin_head within @head do meta :"http-equiv" => "Content-type", :content => "text/html; charset=utf-8" insert_tag Arbre::HTML::Title, [title, active_admin_application.site_title].join(" | ") - active_admin_application.stylesheets.each do |path| - link :href => stylesheet_path(path), :media => "screen", :rel => "stylesheet", :type => "text/css" + active_admin_application.stylesheets.each do |style| + text_node(stylesheet_link_tag(style.path, style.options).html_safe) end active_admin_application.javascripts.each do |path| script :src => javascript_path(path), :type => "text/javascript" end text_node csrf_meta_tag @@ -84,11 +84,11 @@ def build_title_tag h2(title, :id => 'page_title') end def build_action_items - if active_admin_config + if active_admin_config && active_admin_config.action_items? items = active_admin_config.action_items_for(params[:action]) insert_tag view_factory.action_items, items end end @@ -132,10 +132,10 @@ end # Returns the sidebar sections to render for the current action def sidebar_sections_for_action - if active_admin_config + if active_admin_config && active_admin_config.sidebar_sections? active_admin_config.sidebar_sections_for(params[:action]) else [] end end