Skip to content
This repository was archived by the owner on Jan 16, 2024. It is now read-only.

Fix conflicts with apps using multiple engines - #50

Open
ashervb wants to merge 1 commit into
pushtype:masterfrom
mirrorfitness:avb/fix-kaminari
Open

Fix conflicts with apps using multiple engines#50
ashervb wants to merge 1 commit into
pushtype:masterfrom
mirrorfitness:avb/fix-kaminari

Conversation

@ashervb

Copy link
Copy Markdown

If routes are being pulled in via another Engine, the map_app.url_for can fail resulting in a ActionController::UrlGenerationError error

@aaronrussell-x

Copy link
Copy Markdown
Contributor

Hi thanks for the PR, and sorry for keeping you waiting.

I currently can't merge this. The patch was originally introduced so that kaminari could be used in both pushtype and the main app - discussed here kaminari/kaminari#322. I think your PR will reintroduce that issue.

It seems what we actually need is something like:

begin@template.push_type_admin.url_forargumentsrescuebeginbase_page_url_for(page)rescue@template.main_app.url_forargumentsendend

... even if that is the ugliest code I've ever written :trollface: I'm open to any suggestions, just need to make sure all bases are covered. Also need to be mindful that kaminari are apparently working on a refactor that will change all this.

Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@ashervb@aaronrussell-x