Skip to content
Snippets Groups Projects
Commit 890359c0 authored by pabois's avatar pabois
Browse files

researchers now scoped to current_university

parent f5a63cfc
No related branches found
No related tags found
No related merge requests found
...@@ -66,6 +66,7 @@ class User < ApplicationRecord ...@@ -66,6 +66,7 @@ class User < ApplicationRecord
scope :ordered, -> { order(:last_name, :first_name) } scope :ordered, -> { order(:last_name, :first_name) }
def to_s def to_s
"#{first_name} #{last_name}" "#{last_name} #{first_name}"
end end
end end
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<div class="col-md-4"> <div class="col-md-4">
<%= f.input :first_name %> <%= f.input :first_name %>
<%= f.input :last_name %> <%= f.input :last_name %>
<%= f.association :user %> <%= f.association :user, collection: current_university.users.ordered %>
</div> </div>
<div class="col-md-8"> <div class="col-md-8">
<%= f.input :biography, input_html: { rows: 5 } %> <%= f.input :biography, input_html: { rows: 5 } %>
......
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