How to generate anchor link from Empty State tab to another tab in admin application

Highlighted
New Member
2 0 0

Hello,

I'm building an embedded app to be used in admin panel. I'm also trying to follow the best practices saying that I should have an Empty State Tab.

The question: how can I generate a link in html.erb view in my rails application, so I could easily redirect to another tab of the application?

<%= link_to "Something", something_path %> will generate the following link in embedded app:

https://xyz.herokuapp.com /settings

What I want to have is:

https://my-shop-name.myshopify.com/admin/apps/my-app/settings

Thank you in advance!

 

PS. OK, I see that I can use current_shopify_session object to get the shop name, but how I should get the app name so I can generate second part of the url?

 

0 Likes