Sha256: 3dff66a92a0815399559b1a95b7cacce123d4419e3b105363dbff8fb831c6273
Contents?: true
Size: 596 Bytes
Versions: 67
Compression:
Stored size: 596 Bytes
Contents
class NavigationItemDecorator < ApplicationDecorator delegate_all def label result = '' result = object.translation.label if object.translation.label result = object.page.translation.title if object.page && result.blank? result end def path(options = {}) result = '/' if object.translation.path.present? result = object.translation.path elsif object.page.present? result = object.page.decorate.path(options) end result end def options_for_page Page.order(:description).map do |p| [p.description, p.id] end end end
Version data entries
67 entries across 67 versions & 1 rubygems