redirect_to on new page in rails_admin's action

51 Views Asked by At

I'm just starting to learn gem 'rails_admin' and don't understand much yet. I have code in action

for example

...
register_instance_option :controller do
 proc do
   url = object.url

   redirect_to url, allow_other_host: true
end
...

How do I open this link in a new tab in rails_admin Sorry for my English, it's not native.

I tried to include js but it doesn't work in my application. Maybe there is some function in rails_admin

1

There are 1 best solutions below

0
Максим On

Due to insufficient knowledge of rails_admin still found a solution. Added a function

register_instance_option :link_target do
 "_blank"
end