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

researchers

parent c9342232
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,15 @@ class Research::Researcher < ApplicationRecord
belongs_to :user, optional: true
has_and_belongs_to_many :articles, class_name: 'Research::Journal::Article'
after_save :update_articles
def to_s
"#{ first_name } #{ last_name }"
end
protected
def update_articles
articles.find_each &:save
end
end
---
title: "<%= "#{ @researcher }"%>"
first_name: "<%= @researcher.first_name %>"
last_name: <%= @researcher.last_name %>
biography: "<%= @researcher.biography %>"
......
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