diff --git a/app/models/communication/website/page.rb b/app/models/communication/website/page.rb index a438514beab1a2f59cf36b620ff82f4d71f0aea5..808a6b07215d6b415cf7efc3e86763aa7e2f7626 100644 --- a/app/models/communication/website/page.rb +++ b/app/models/communication/website/page.rb @@ -49,10 +49,6 @@ class Communication::Website::Page < ApplicationRecord has_many :children, class_name: 'Communication::Website::Page', foreign_key: :parent_id - has_one :imported_page, - class_name: 'Communication::Website::Imported::Page', - foreign_key: :page_id, - dependent: :destroy validates :title, presence: true diff --git a/app/models/communication/website/post.rb b/app/models/communication/website/post.rb index 9e25cdd85a56f04687bd59ad1fdaf6d9b9af407a..536b20cfff2d41c0ff885126c199c66f0b105987 100644 --- a/app/models/communication/website/post.rb +++ b/app/models/communication/website/post.rb @@ -36,10 +36,6 @@ class Communication::Website::Post < ApplicationRecord belongs_to :university belongs_to :website, foreign_key: :communication_website_id - has_one :imported_post, - class_name: 'Communication::Website::Imported::Post', - foreign_key: :post_id, - dependent: :destroy scope :ordered, -> { order(published_at: :desc, created_at: :desc) } scope :recent, -> { order(published_at: :desc).limit(5) } diff --git a/app/views/admin/communication/website/pages/show.html.erb b/app/views/admin/communication/website/pages/show.html.erb index 78f3592f29c90310b9707c140bce7ded325a290f..ed4e45b2f89098015f5f98dca82482375e520c9b 100644 --- a/app/views/admin/communication/website/pages/show.html.erb +++ b/app/views/admin/communication/website/pages/show.html.erb @@ -40,12 +40,6 @@ <%= t @page.published %> </td> </tr> - <% if @page.imported_page %> - <tr> - <td><%= t('communication.website.imported.from') %></td> - <td><a href="<%= @page.imported_page.url %>" target="_blank"><%= t('communication.website.imported.original_url') %></a></td> - </tr> - <% end %> <% if @page.parent %> <tr> <td><%= Communication::Website::Page.human_attribute_name('parent') %></td> diff --git a/app/views/admin/communication/website/posts/show.html.erb b/app/views/admin/communication/website/posts/show.html.erb index 95856f9e1a0dd2e27faeb37ea15bad8df2bb5358..be2b0b9a42fbb730d07e332ff7a4492763b10465 100644 --- a/app/views/admin/communication/website/posts/show.html.erb +++ b/app/views/admin/communication/website/posts/show.html.erb @@ -38,12 +38,6 @@ <% end %> </td> </tr> - <% if @post.imported_post %> - <tr> - <td><%= t('communication.website.imported.from') %></td> - <td><a href="<%= @post.imported_post.url %>" target="_blank"><%= t('communication.website.imported.original_url') %></a></td> - </tr> - <% end %> </tbody> </table> </div> diff --git a/lib/tasks/app.rake b/lib/tasks/app.rake index 1da5718b4a666a4aa5f8e4ec5ae30107496d8116..c8ab3b1458c05fc56ca777726b2c94e9f48aa941 100644 --- a/lib/tasks/app.rake +++ b/lib/tasks/app.rake @@ -25,9 +25,9 @@ namespace :app do Communication::Website::Page.find_each { |page| page.update(text: page.old_text) } - Communication::Website::Medium.find_each { |medium| - medium.send(:set_featured_images) - } + Communication::Website::Medium.find_each { |medium| + medium.send(:set_featured_images) + } end namespace :db do