jejacks0n/mercury — pull request #129 by anoras (2012-01-13 11:50:50+00:00)
Title: Made RegEx used to extract iFrameSrc configurable so that custom routes can be used.

Added "editorUrlRegex" to Mercury configuration to override default http://example.com/editor/* route.
Added fallback to default route regex if no override is specified.

This change allows custom routes to be used for the Mercury controller. For example:

# ------

App.routes.draw do
scope '/mercury' do
match ':type/:resource' => "mercury#resource"
match 'snippets/:name/options' => "mercury#snippet_options"
match 'snippets/:name/preview' => "mercury#snippet_preview"
end

# This route can be used by configuring Mercury to use the following regex: /([http|https]:\/\/[^\/]*)\/(.*)\/edit\/?/i
match '*path/edit' => "mercury#edit", :as => :mercury_editor
end

# EOF -----

This commit resolves an issue of infinite recursive loading of the editor when using a route different from Mercury's default route.