Giter VIP home page Giter VIP logo

Comments (7)

enriclluelles avatar enriclluelles commented on August 12, 2024

Well, it doesn't because you are declaring the resource as a singular resource, (notice that it's resource instead of resources) and as such it doesn't have new route

from route_translator.

tute avatar tute commented on August 12, 2024

Why not? Makes sense to have a new action for buiding a unique review of an object. See http://guides.rubyonrails.org/routing.html#singular-resources

Thank you again!

from route_translator.

enriclluelles avatar enriclluelles commented on August 12, 2024

Damn, you're right and I'm wrong about this... Sorry for the bad advice.

I just created a brand new app using the gem and added the routes mentioned above and this works in the console:

> app.new_dashboard_request_proposal_order_review_path(request_proposal_id: 1)
=> "/dashboard/proposals/1/review/new"

from route_translator.

tute avatar tute commented on August 12, 2024

ok it works! Don't know why I couldn't make it work, sorry to bother and thanks for the help!

from route_translator.

tute avatar tute commented on August 12, 2024

Surely it's application specific configuration, but I'm getting bit by this in different places. I'll share what if I find why!

from route_translator.

tute avatar tute commented on August 12, 2024

Got it, route_translator generates something like:

 car_en GET /cars/:id(.:format)     cars#show {:locale=>"en"}
 car_es GET /es/autos/:id(.:format) cars#show {:locale=>"es"}

And I need to generate something like:

 car    GET /cars/:id(.:format)     cars#show # Here we infer language
 car_en GET /en/cars/:id(.:format)  cars#show {:locale=>"en"}
 car_es GET /es/autos/:id(.:format) cars#show {:locale=>"es"}

from route_translator.

tute avatar tute commented on August 12, 2024

Solved, see tute@fa76534

from route_translator.

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.