Coder Social home page Coder Social logo

Mounting app after url parameter about router HOT 11 CLOSED

hanami avatar hanami commented on July 17, 2024
Mounting app after url parameter

from router.

Comments (11)

TiteiKo avatar TiteiKo commented on July 17, 2024 1

@jodosha I'd be glad to, and I've tried, before submitting this issue and again today...

@AlfonsoUceda Do you have any lead I could look into?

from router.

AlfonsoUceda avatar AlfonsoUceda commented on July 17, 2024

Hi @TiteiKo have you tried mount Admin::Application, at: '/:locale/admin' without parenthesis? I am just writing without trying in the laptop because I'm not in front of it.

from router.

TiteiKo avatar TiteiKo commented on July 17, 2024

@AlfonsoUceda Yep, same problem in urls generation with and without parenthesis. Generated urls looks like /:locale/admin/users?locale=en

from router.

AlfonsoUceda avatar AlfonsoUceda commented on July 17, 2024

I'll try to take a look this weekend @TiteiKo

from router.

AlfonsoUceda avatar AlfonsoUceda commented on July 17, 2024

Hi @TiteiKo I was researching the problem and it seems, there is a bug that you can't use variables in the container. So I have to see how I can fix it, sorry for the problem :(

from router.

TiteiKo avatar TiteiKo commented on July 17, 2024

Hi @AlfonsoUceda
Thanks for your time and the update! Glad I could uncover a bug, and no problem, Hanami's not supposed to be stable yet, and I'll still be able to work in the meantime, it's the last thing on my backlog for v1 ;)

from router.

jodosha avatar jodosha commented on July 17, 2024

@TiteiKo @AlfonsoUceda Hi, this isn't a bug, it's just not possible to do so at the moment.


Because @TiteiKo is interested in this change, I suggest her to implement it.
At this point in time, it's beneficial that Hanami shareholders can write enhancements or features for real world apps.

from router.

AlfonsoUceda avatar AlfonsoUceda commented on July 17, 2024

Hi @TiteiKo

You can start here, the prefix in the container ends in that variable, when I was tackling this, one of my ideas was creating a class to handle that, replace :variables in that prefix with options passed to the path or url to generate.

from router.

jodosha avatar jodosha commented on July 17, 2024

@TiteiKo Is this something still interesting for you to implement?

from router.

TiteiKo avatar TiteiKo commented on July 17, 2024

@jodosha Not ATM, no. I've tried to do it, but without success. I'll use a rewrite rule on nginx to go from /:locale/admin to /admin/:locale
After looking at the code, I think it would make a lot of changes for a very specific need that would probably not occur on a fresh new project.

from router.

jodosha avatar jodosha commented on July 17, 2024

@TiteiKo Thank you 😄

from router.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.