diff --git a/app/models/communication/website/structure.rb b/app/models/communication/website/structure.rb index d41a1e16586109afffd00467842eaab2cfc32691..41e414f9704d62d48a6ed78787e749f35513318d 100644 --- a/app/models/communication/website/structure.rb +++ b/app/models/communication/website/structure.rb @@ -77,7 +77,7 @@ class Communication::Website::Structure < ApplicationRecord dependencies << Communication::Website::Structure::Administrators.find(id) dependencies << Communication::Website::Structure::Persons.find(id) dependencies << Communication::Website::Structure::Authors.find(id) if website.authors.any? - dependencies << Communication::Website::Structure::Posts.find(id) if website.posts.published.any? + dependencies << Communication::Website::Structure::CommunicationPosts.find(id) if website.posts.published.any? if website.about.is_a? Education::School dependencies << Communication::Website::Structure::EducationPrograms.find(id) diff --git a/app/models/communication/website/structure/posts.rb b/app/models/communication/website/structure/communication_posts.rb similarity index 95% rename from app/models/communication/website/structure/posts.rb rename to app/models/communication/website/structure/communication_posts.rb index db91cfca05481df58c8418071c7b69e009708c35..06df6b8da3e2d4bf4fb32af9b0dd679896dd096b 100644 --- a/app/models/communication/website/structure/posts.rb +++ b/app/models/communication/website/structure/communication_posts.rb @@ -46,10 +46,10 @@ # fk_rails_... (communication_website_id => communication_websites.id) # fk_rails_... (university_id => universities.id) # -class Communication::Website::Structure::Posts < Communication::Website::Structure +class Communication::Website::Structure::CommunicationPosts < Communication::Website::Structure def self.polymorphic_name - 'Communication::Website::Structure::Posts' + 'Communication::Website::Structure::CommunicationPosts' end def git_path(website) diff --git a/app/models/user/with_person.rb b/app/models/user/with_person.rb index 5ab95727d620865fb9fc1054ab6be316c5b7bf31..52e74cda98bbdd95d652836e69d36e16e9f36f7a 100644 --- a/app/models/user/with_person.rb +++ b/app/models/user/with_person.rb @@ -17,5 +17,6 @@ module User::WithPerson end person.user = self person.save + byebug end end diff --git a/app/services/curator.rb b/app/services/curator.rb index cfd2b501b3176a66defd2b14a9a4ae25d030c8b0..8b56f1a912e21ccf745cc288fde9e03c190760bf 100644 --- a/app/services/curator.rb +++ b/app/services/curator.rb @@ -22,7 +22,7 @@ class Curator title: page.title, text: text, slug: page.title.parameterize, - author: @user.author, + author: @user.person, published_at: Time.now ) end diff --git a/app/views/admin/communication/website/structure/communication_posts/static.html.erb b/app/views/admin/communication/website/structure/communication_posts/static.html.erb new file mode 100644 index 0000000000000000000000000000000000000000..9fd1a00a8041cf2e85b7ef95f784ad4c956225d1 --- /dev/null +++ b/app/views/admin/communication/website/structure/communication_posts/static.html.erb @@ -0,0 +1,7 @@ +--- +title: > + <%= @website.structure.communication_posts_title %> +url: <%= "/#{@website.structure.communication_posts_path}/" %> +description: > + <%= prepare_text_for_static @website.structure.communication_posts_description %> +--- diff --git a/app/views/admin/communication/website/structure/posts/static.html.erb b/app/views/admin/communication/website/structure/posts/static.html.erb deleted file mode 100644 index d80cb9474eab25f7394139f75852edbcc19e4ac0..0000000000000000000000000000000000000000 --- a/app/views/admin/communication/website/structure/posts/static.html.erb +++ /dev/null @@ -1,7 +0,0 @@ ---- -title: > - <%= @website.structure.posts_title %> -url: <%= "/#{@website.structure.posts_path}/" %> -description: > - <%= prepare_text_for_static @website.structure.posts_description %> ----