Skip to content

Instantly share code, notes, and snippets.

@julik
Last active December 15, 2015 11:49
Show Gist options
  • Save julik/5256141 to your computer and use it in GitHub Desktop.
Save julik/5256141 to your computer and use it in GitHub Desktop.
def path
super || own_computed_path
end
private
def own_computed_path
path_components = [parent_path]
if node_id && !parent_path.empty?
path_components.push '[%s]' % node_id
end
path_components.join
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment