Skip to content

Instantly share code, notes, and snippets.

@paulcsmith
Created November 7, 2016 15:37
Show Gist options
  • Save paulcsmith/32e48cc6eb0a99cadc69dd09d8e5cb95 to your computer and use it in GitHub Desktop.
Save paulcsmith/32e48cc6eb0a99cadc69dd09d8e5cb95 to your computer and use it in GitHub Desktop.
module RouteHelpers
end
class Router
macro add(name, path)
module RouteHelpers
def {{name.id}}
{{path}}
end
end
end
end
Router.add(:announcement_index_path, "/announcements")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment