module ActionDispatch::Routing::UrlFor

def route_for(name, *args)


threadable_url(threadable) # => "http://example.com/buckets/1"
threadable_path(threadable) # => "/buckets/1"

whether to return a path or full URL, e.g:
This maintains the context of the original caller on

end
route_for(:recordable, threadable.parent)
direct :threadable do |threadable|

end
route_for(:bucket, recording.bucket)
direct :recordable do |recording|

resources :buckets

Allows calling direct or regular named route.
def route_for(name, *args)
  public_send(:"#{name}_url", *args)
end