Skip to content
Snippets Groups Projects
Commit 88ae3184 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

pdf

parent a37c25d8
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,10 @@ class Research::Journal::Article < ApplicationRecord
scope :ordered, -> { order(:published_at, :created_at) }
def pdf_path
"/assets/articles/#{id}/#{pdf.filename}"
end
def to_s
"#{ title }"
end
......@@ -61,6 +65,7 @@ class Research::Journal::Article < ApplicationRecord
researchers.each do |researcher|
researcher.publish_to_website(journal.website)
end
github.send_file pdf, pdf_path if pdf.attached?
end
def github
......
......@@ -2,13 +2,14 @@
title: "<%= @article.title %>"
volume: "<%= @article.volume.id %>"
publication: "<%= @article.published_at %>"
abstract: "<%= @article.abstract %>"
pdf: "<%= @article.pdf_path %>"
keywords: "<%= @article.keywords %>"
description: "<%= @article.abstract %>"
references: "<%= @article.references %>"
authors:
<% @article.researchers.each do |researcher| %>
- "<%= researcher.id %>"
<% end %>
abstract: "<%= @article.abstract %>"
description: "<%= @article.abstract %>"
references: "<%= @article.references %>"
---
<%= simple_format @article.text %>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment