Skip to content

Commit

Permalink
Use target="_blank" instead of target="blank" (incorrect)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndbroadbent committed Mar 15, 2024
1 parent 01d0156 commit e04cb7a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/1-general-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ ActiveAdmin.setup do |config|
config.namespace :admin do |admin|
admin.build_menu :utility_navigation do |menu|
menu.add label: "ActiveAdmin.info", url: "https://www.activeadmin.info",
html_options: { target: :blank }
html_options: { target: '_blank' }
admin.add_current_user_to_menu menu
admin.add_logout_button_to_menu menu
end
Expand Down
2 changes: 1 addition & 1 deletion docs/2-resource-customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ config.namespace :admin do |admin|
menu.add label: "Sites" do |sites|
sites.add label: "Google",
url: "https://google.com",
html_options: { target: :blank }
html_options: { target: '_blank' }

sites.add label: "Facebook",
url: "https://facebook.com"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ ActiveAdmin.setup do |config|
#
# config.namespace :admin do |admin|
# admin.build_menu :default do |menu|
# menu.add label: "My Great Website", url: "https://mygreatwebsite.example.com", html_options: { target: :blank }
# menu.add label: "My Great Website", url: "https://mygreatwebsite.example.com", html_options: { target: '_blank' }
# end
# end

Expand Down
4 changes: 2 additions & 2 deletions spec/unit/menu_item_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ module ActiveAdmin
end

it "should accept an options hash for link_to" do
item = MenuItem.new html_options: { target: :blank }
expect(item.html_options).to include(target: :blank)
item = MenuItem.new html_options: { target: '_blank' }
expect(item.html_options).to include(target: '_blank')
end

context "with no items" do
Expand Down

0 comments on commit e04cb7a

Please sign in to comment.