Sha256: 336a7b2ba961088b90d34645d934696352014ab9749f7c4c27fbb16767bc1685

Contents?: true

Size: 607 Bytes

Versions: 50

Compression:

Stored size: 607 Bytes

Contents

module ActiveAdmin
  module Views

    class SidebarSection < Panel
      builder_method :sidebar_section

      # Takes a ActiveAdmin::Sidebar::Section instance
      def build(section)
        @section = section
        super(@section.title, :icon => @section.icon)
        self.id = @section.id
        build_sidebar_content
      end

      protected

      def build_sidebar_content
        if @section.block
          rvalue = instance_eval(&@section.block)
          self << rvalue if rvalue.is_a?(String)
        else
          render(@section.partial_name)
        end
      end
    end

  end
end

Version data entries

50 entries across 50 versions & 2 rubygems

Version Path
lalala-4.0.0.dev.141 vendor/deps/active_admin/lib/active_admin/views/components/sidebar_section.rb
lalala-4.0.0.dev.136 vendor/deps/active_admin/lib/active_admin/views/components/sidebar_section.rb
lalala-4.0.0.dev.135 vendor/deps/active_admin/lib/active_admin/views/components/sidebar_section.rb
lalala-4.0.0.dev.134 vendor/deps/active_admin/lib/active_admin/views/components/sidebar_section.rb
lalala-4.0.0.dev.133 vendor/deps/active_admin/lib/active_admin/views/components/sidebar_section.rb
lalala-4.0.0.dev.132 vendor/deps/active_admin/lib/active_admin/views/components/sidebar_section.rb
lalala-4.0.0.dev.131 vendor/deps/active_admin/lib/active_admin/views/components/sidebar_section.rb
lalala-4.0.0.dev.129 vendor/deps/active_admin/lib/active_admin/views/components/sidebar_section.rb
lalala-4.0.0.dev.128 vendor/deps/active_admin/lib/active_admin/views/components/sidebar_section.rb
lalala-4.0.0.dev.126 vendor/deps/active_admin/lib/active_admin/views/components/sidebar_section.rb
lalala-4.0.0.dev.125 vendor/deps/active_admin/lib/active_admin/views/components/sidebar_section.rb
lalala-4.0.0.dev.124 vendor/deps/active_admin/lib/active_admin/views/components/sidebar_section.rb
lalala-4.0.0.dev.123 vendor/deps/active_admin/lib/active_admin/views/components/sidebar_section.rb
lalala-4.0.0.dev.118 vendor/deps/active_admin/lib/active_admin/views/components/sidebar_section.rb
lalala-4.0.0.dev.116 vendor/deps/active_admin/lib/active_admin/views/components/sidebar_section.rb
lalala-4.0.0.dev.114 vendor/deps/active_admin/lib/active_admin/views/components/sidebar_section.rb
lalala-4.0.0.dev.113 vendor/deps/active_admin/lib/active_admin/views/components/sidebar_section.rb
lalala-4.0.0.dev.111 vendor/deps/active_admin/lib/active_admin/views/components/sidebar_section.rb
lalala-4.0.0.dev.109 vendor/deps/active_admin/lib/active_admin/views/components/sidebar_section.rb
lalala-4.0.0.dev.107 vendor/deps/active_admin/lib/active_admin/views/components/sidebar_section.rb