Sha256: 39cd0976a81b216cade6e2ed3c9153e303ddef594841ac98760a712d658b4266

Contents?: true

Size: 287 Bytes

Versions: 5

Compression:

Stored size: 287 Bytes

Contents

module Trestle
  module NavigationHelper
    def current_navigation_item?(item)
      current_page?(item.path) || (item.admin && current_admin?(item.admin))
    end

    def current_admin?(admin)
      respond_to?(:admin) && self.admin && self.admin.name == admin.name
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
trestle-0.9.4 app/helpers/trestle/navigation_helper.rb
trestle-0.9.3 app/helpers/trestle/navigation_helper.rb
trestle-0.9.2 app/helpers/trestle/navigation_helper.rb
trestle-0.9.1 app/helpers/trestle/navigation_helper.rb
trestle-0.9.0 app/helpers/trestle/navigation_helper.rb