Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added better support for :at Rails mount option. #2857

Merged
merged 1 commit into from
Jan 26, 2015

Conversation

parndt
Copy link
Member

@parndt parndt commented Jan 26, 2015

i.e.

mount Refinery::Core::Engine, at: '/some/subfolder'

Fixes #2740

This is done via changing `Refinery::Core.config.mounted_path`
which is located inside `config/initializers/refinery/core.rb`
in an application which has Refinery.

Fixes #2740
@parndt parndt force-pushed the feature/refinery-subfolder-issue-2740 branch from 3053a76 to 099b750 Compare January 26, 2015 08:10
@simi
Copy link
Member

simi commented Jan 26, 2015

I think this is good for now, but it is not a 100% Rails way.

@parndt
Copy link
Member Author

parndt commented Jan 26, 2015

What would be the 100% Rails way?

@simi
Copy link
Member

simi commented Jan 26, 2015

IMHO make Frontend and Backend as separated engines and allow to mount them separately when needed or mount "meta-engine" for both at once.

But as I wrote before, this is ok for now.

simi added a commit that referenced this pull request Jan 26, 2015
…ue-2740

Added better support for `:at` Rails mount option.
@simi simi merged commit 2d1d8a4 into master Jan 26, 2015
@simi simi deleted the feature/refinery-subfolder-issue-2740 branch January 26, 2015 09:09
@parndt
Copy link
Member Author

parndt commented Jan 26, 2015

Ah, yes, well @bricesanchez is working on making it better over at #2811 😄

@@ -219,10 +219,11 @@ def mount!
mount = %Q{
# This line mounts Refinery's routes at the root of your application.
# This means, any requests to the root URL of your application will go to Refinery::PagesController#home.
# If you would like to change where this extension is mounted, simply change the :at option to something different.
# If you would like to change where this extension is mounted, simply change the
# configuration option `mounted_path` to something different in config/initializers/refinery/core.rb
#
# We ask that you don't use the :as option here, as Refinery relies on it being the default of "refinery"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this still the case?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, unless you can find a way to work around it. We reference refinery.path_helper everywhere.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug in "Home" page button when mounting to a directory other than root
3 participants