diff --git a/app/controllers/admin/dashboard/actions_controller.rb b/app/controllers/admin/dashboard/actions_controller.rb
index 27b094d61..98fd27072 100644
--- a/app/controllers/admin/dashboard/actions_controller.rb
+++ b/app/controllers/admin/dashboard/actions_controller.rb
@@ -57,7 +57,7 @@ class Admin::Dashboard::ActionsController < Admin::Dashboard::BaseController
:title, :description, :short_description, :request_to_administrators, :day_offset,
:required_supports, :order, :active, :action_type, :published_proposal,
documents_attributes: [:id, :title, :attachment, :cached_attachment, :user_id, :_destroy],
- links_attributes: [:id, :label, :url, :open_in_new_tab, :_destroy]
+ links_attributes: [:id, :label, :url, :_destroy]
)
end
diff --git a/app/views/dashboard/actions/new_request.html.erb b/app/views/dashboard/actions/new_request.html.erb
index 582f74a80..874d98b99 100644
--- a/app/views/dashboard/actions/new_request.html.erb
+++ b/app/views/dashboard/actions/new_request.html.erb
@@ -13,11 +13,7 @@
<%= t("dashboard.new_request.links") %>
<% dashboard_action.links.each do |link| %>
- <% if link.open_in_new_tab %>
-
<%= link_to link.label, link.url, target: "_blank" %>
- <% else %>
-
<%= link_to link.label, link.url %>
- <% end %>
+
<%= link_to link.label, link.url, target: "_blank" %>
<% end %>
<% end %>
diff --git a/config/locales/en/activerecord.yml b/config/locales/en/activerecord.yml
index ecb9a326f..9396fbc85 100644
--- a/config/locales/en/activerecord.yml
+++ b/config/locales/en/activerecord.yml
@@ -354,7 +354,6 @@ en:
link:
label: Title
url: Link
- open_in_new_tab: Open in new tab
errors:
models:
user:
diff --git a/config/locales/es/activerecord.yml b/config/locales/es/activerecord.yml
index 1d1c713da..f564f4e11 100644
--- a/config/locales/es/activerecord.yml
+++ b/config/locales/es/activerecord.yml
@@ -355,7 +355,6 @@ es:
link:
label: TÃtulo
url: Enlace
- open_in_new_tab: Abrir en ventana nueva
errors:
models:
user:
diff --git a/db/migrate/20190411090023_remove_open_in_new_tab_from_links.rb b/db/migrate/20190411090023_remove_open_in_new_tab_from_links.rb
new file mode 100644
index 000000000..ae7aa20a6
--- /dev/null
+++ b/db/migrate/20190411090023_remove_open_in_new_tab_from_links.rb
@@ -0,0 +1,5 @@
+class RemoveOpenInNewTabFromLinks < ActiveRecord::Migration
+ def change
+ remove_column :links, :open_in_new_tab, :boolean
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 6c9c4d775..bad21eac1 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20190205131722) do
+ActiveRecord::Schema.define(version: 20190411090023) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -804,7 +804,6 @@ ActiveRecord::Schema.define(version: 20190205131722) do
create_table "links", force: :cascade do |t|
t.string "label"
t.string "url"
- t.boolean "open_in_new_tab"
t.string "linkable_type"
t.integer "linkable_id"
t.datetime "created_at", null: false
diff --git a/lib/tasks/proposal_actions.rake b/lib/tasks/proposal_actions.rake
index 3128a85a1..51021490d 100644
--- a/lib/tasks/proposal_actions.rake
+++ b/lib/tasks/proposal_actions.rake
@@ -7,7 +7,6 @@ namespace :proposal_actions do
Link.create!(
label: action.title,
url: action.link,
- open_in_new_tab: true,
linkable: action
)
end
diff --git a/spec/factories/proposals.rb b/spec/factories/proposals.rb
index 06f284d54..1b0327559 100644
--- a/spec/factories/proposals.rb
+++ b/spec/factories/proposals.rb
@@ -174,10 +174,5 @@ FactoryBot.define do
linkable { |s| s.association(:action) }
label { Faker::Lorem.sentence }
url { Faker::Internet.url }
- open_in_new_tab false
-
- trait :open_in_new_tab do
- open_in_new_tab true
- end
end
end