I'm checking mercury editor https://github.com/jejacks0n/mercury on small project.
These is my routes.rb file
Myapp::Application.routes.draw do
mount Mercury::Engine => '/'
scope '(:locale)' do
resources :post
end
end
My post url are:
http://localhost:3000/es/posts/1
http://localhost:3000/en/posts/2
http://localhost:3000/de/posts/3
.
.
.
My mercury routes:
Routes for Mercury::Engine:
mercury_editor /editor(/*requested_uri)(.:format) mercury#edit
/mercury/:type/:resource(.:format) mercury#resource
/mercury/snippets/:name/options(.:format) mercury#snippet_options
/mercury/snippets/:name/preview(.:format) mercury#snippet_preview
I'm try something like:
<%= link_to 'Edit', "/editor" + request.path %>
but I get a wrong url http://localhost:3000/editor/es/posts/2
.
can someone say me how add a specify path to my routes for something like:
http://localhost:3000/es/editor/posts/1
or http://localhost:3000/editor/posts/1