lib/active_admin/views/components/sidebar_section.rb in activeadmin-0.6.6 vs lib/active_admin/views/components/sidebar_section.rb in activeadmin-1.0.0.pre1

- old
+ new

@@ -5,19 +5,20 @@ builder_method :sidebar_section # Takes a ActiveAdmin::SidebarSection instance def build(section) @section = section - super(@section.title, :icon => @section.icon) + super(@section.title, icon: @section.icon) + add_class @section.custom_class if @section.custom_class self.id = @section.id build_sidebar_content end protected def build_sidebar_content if @section.block - rvalue = instance_eval(&@section.block) + rvalue = instance_exec(&@section.block) self << rvalue if rvalue.is_a?(String) else render(@section.partial_name) end end