I hereby claim:
- I am randland on github.
- I am randland (https://keybase.io/randland) on keybase.
- I have a public key ASD06NWrWKWq8-MMuaVtmxgRTEhuDQ7vWYetRwzDmVZQbAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
def random_in(a, *b) | |
b.any? ? [a, *b][rand(b.count+1)] : a.to_a[rand(a.count)] | |
end |
module ApplicationHelper | |
def breadcrumb(url, options = {}) | |
options.reverse_merge!( :separator => ' » ', | |
:home_link => 'Home') | |
path_segments = url.sub(/\?.*/,'').split('/')[1..-1] | |
return '' if path_segments.blank? # ie: suppress breadcrumbs on homepage |