Module: Navable::InstanceMethodsForNavables

Defined in:
app/models/navable.rb

Instance Method Summary collapse

Instance Method Details

#is_navable?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'app/models/navable.rb', line 17

def is_navable? 
  true
end


35
36
37
# File 'app/models/navable.rb', line 35

def nav
  nav_node
end


25
26
27
28
29
# File 'app/models/navable.rb', line 25

def nav_node
  node = super
  node = build_nav_node unless node
  return node
end

Returns:

  • (Boolean)


21
22
23
# File 'app/models/navable.rb', line 21

def navable?
  is_navable?
end


39
40
41
# File 'app/models/navable.rb', line 39

def navable_children
  children.select { |child| child.respond_to? :nav_node }
end


31
32
33
# File 'app/models/navable.rb', line 31

def navnode
  nav_node
end