Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dcvezzani/5679005 to your computer and use it in GitHub Desktop.
Save dcvezzani/5679005 to your computer and use it in GitHub Desktop.
Dynamically determine the route namespace for a bcms content block resource.
var cms_namespace = "<%= link_to("xxx", block_path(@block)).match(/href=\"\/([^\/]+)/)[1] %>";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment