开发者

How do I create a URL to link between apps in Padrino?

开发者 https://www.devze.com 2023-04-09 05:24 出处:网络
I have a separate app called \"api\" that I\'d like to link to from my admin app.But if I do a link like:

I have a separate app called "api" that I'd like to link to from my admin app. But if I do a link like:

%td=button_to "API", url("/api/users", :attributes, :id => user.id), 
  :method => :get, :class => :button_to

It takes me to /admin/api/u开发者_高级运维sers, I want to go to api/users/attributes.


Not sure if I understand but if you are in App2 and you want to render a link from another app you can: Api.url(:users, :attributes, :id => user.id)

0

精彩评论

暂无评论...
验证码 换一张
取 消