Sha256: 523c2abd9bd78e084b8ef38c62521021d772ac61407743c15797c44950062ace

Contents?: true

Size: 480 Bytes

Versions: 21

Compression:

Stored size: 480 Bytes

Contents

require 'action_view'
module WoopleTheme
  module Dashboard
    class ElectivesSectionPresenter < SectionPresenter
      enforce_definitions :electives_history,
                          :electives_exceptions

      def render_history
        yield if render?(section.electives_history)
      end

      def render_exceptions
        yield if render?(section.electives_exceptions)
      end

      private

      def render?(tab)
        tab.count > 0
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
woople-theme-0.6.11 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.6.10 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.6.9 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.6.8 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.6.7 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.6.6 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.6.5 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.6.4 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.6.3 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.6.2 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.6.1 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.6 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.5.17 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.5.16 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.5.15 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.5.14 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.5.13 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.5.12 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.5.11 app/presenters/woople_theme/dashboard/electives_section_presenter.rb
woople-theme-0.5.10 app/presenters/woople_theme/dashboard/electives_section_presenter.rb