Class: NavigationLink

Inherits:
OpenStruct
  • Object
show all
Defined in:
app/helpers/admin_layout_helper.rb

Instance Method Summary collapse

Instance Method Details



9
10
11
12
13
# File 'app/helpers/admin_layout_helper.rb', line 9

def link_depth
  # This really isn't the best way to do this, but, it works for this site
  
  self.url.count '/'
end


15
16
17
# File 'app/helpers/admin_layout_helper.rb', line 15

def link_id
  self.title.downcase.gsub(/[^a-z0-9 ]/i,'').tr(' ','_').gsub(/[\_]{2,}/,'_')
end