Skip to main content

How do i generate links like shopify does ****.myshopify.com ?

Rails • Asked by Youssef ELMZELJI
Hey, guys i wanna know how to generate a unique url foreach user but didn't know how to do it.
#Stuck

Could you give some examples of Shopify links? Would be easier to give suggestions based on that.

Hi Youssef,

You can use route constraints to manage this.

Check out this gist: https://gist.github.com/nanosplit/b49fadaff9c4342ac4bd72cbd325495a

Good read: https://mythoughts.io/managing-dynamic-domains-with-rails-b6ab1040dc8c

Login or Create An Account to join the conversation.

Subscribe to the newsletter

Join 24,647+ developers who get early access to new screencasts, articles, guides, updates, and more.

    By clicking this button, you agree to the GoRails Terms of Service and Privacy Policy.

    More of a social being? We're also on Twitter and YouTube.