Workshops authored
- <% if @facilitator.user && @facilitator.user.workshops.any? %> + <% if @person.user && @person.user.workshops.any? %>Workshop variations authored
- <% if @facilitator.user && @facilitator.user.workshop_variations_as_creator.any? %> + <% if @person.user && @person.user.workshop_variations_as_creator.any? %>" + "WORKSHOP: #{workshop_variation.workshop.name}", @@ -209,11 +209,11 @@ <% end %> - <% if @facilitator.profile_show_stories? %> + <% if @person.profile_show_stories? %>
Stories authored/featured
- <% stories = Story.where(id: @facilitator.user&.stories_as_creator&.pluck(:id).to_a + - @facilitator.stories_as_spotlighted_facilitator.pluck(:id)) %> + <% stories = Story.where(id: @person.user&.stories_as_creator&.pluck(:id).to_a + + @person.stories_as_spotlighted_person.pluck(:id)) %> <% if stories.any? %>
@@ -241,12 +241,12 @@
- <% if @facilitator.profile_show_events_registered? %>
+ <% if @person.profile_show_events_registered? %>
Events registered
- <% if @facilitator.event_registrations.any? %>
+ <% if @person.event_registrations.any? %>
- <% @facilitator.event_registrations.includes(:event).order("events.start_date DESC").each do |event_registration| %>
+ <% @person.event_registrations.includes(:event).order("events.start_date DESC").each do |event_registration| %>
<%= render "show_card",
bookmarkable: event_registration.event,
record_title: "#{event_registration.event.title}
" +
@@ -266,8 +266,8 @@
- <% if current_user.super_user || current_user == @facilitator.user %>
-
+ <% if current_user.super_user || current_user == @person.user %>
+
@@ -281,12 +281,12 @@
- <% if @facilitator.profile_show_workshop_ideas? %>
+ <% if @person.profile_show_workshop_ideas? %>
Workshop ideas submitted
- <% if @facilitator.user && @facilitator.user.workshop_ideas_as_creator.any? %>
+ <% if @person.user && @person.user.workshop_ideas_as_creator.any? %>
- <% @facilitator.user.workshop_ideas_as_creator.order(created_at: :desc).each do |idea| %>
+ <% @person.user.workshop_ideas_as_creator.order(created_at: :desc).each do |idea| %>
<%= render "show_card",
record: idea.decorate, title_font_size: "text-sm" %>
<% end %>
@@ -298,12 +298,12 @@
<% end %>
- <% if @facilitator.profile_show_story_ideas? %>
+ <% if @person.profile_show_story_ideas? %>
Story ideas submitted
- <% if @facilitator.user && @facilitator.user.story_ideas_as_creator.any? %>
+ <% if @person.user && @person.user.story_ideas_as_creator.any? %>
- <% @facilitator.user.story_ideas_as_creator.order(created_at: :desc).each do |story_idea| %>
+ <% @person.user.story_ideas_as_creator.order(created_at: :desc).each do |story_idea| %>
<%= render "show_card",
record_title: story_idea.workshop_title,
record: story_idea.decorate, title_font_size: "text-sm" %>
@@ -316,12 +316,12 @@
<% end %>
- <% if @facilitator.profile_show_workshop_logs? %>
+ <% if @person.profile_show_workshop_logs? %>
Workshop logs submitted
- <% if @facilitator.user && @facilitator.user.workshop_logs.any? %>
+ <% if @person.user && @person.user.workshop_logs.any? %>
- <% @facilitator.user.workshop_logs.order(date: :desc, created_at: :desc).each do |workshop_log| %>
+ <% @person.user.workshop_logs.order(date: :desc, created_at: :desc).each do |workshop_log| %>
<%= render "show_card",
record_title: "#{workshop_log.workshop&.title ||
"Workshop log #" + workshop_log.id.to_s} - #{workshop_log.windows_type_name}",
diff --git a/app/views/projects/_form.html.erb b/app/views/projects/_form.html.erb
index bd8316059..3e5bbb89e 100644
--- a/app/views/projects/_form.html.erb
+++ b/app/views/projects/_form.html.erb
@@ -263,7 +263,7 @@
<% f.object.user && f.object.user.project_users.each do |pu| %>
- <%= pu.title || pu.position %> -
- <%= facilitator_profile_button(pu.user.facilitator) if pu.persisted? && pu.user.facilitator %>
+ <%= person_profile_button(pu.user.person) if pu.persisted? && pu.user.person %>
<% end %>
diff --git a/app/views/projects/_project_user_fields.html.erb b/app/views/projects/_project_user_fields.html.erb
index 424ed1913..9be10777b 100644
--- a/app/views/projects/_project_user_fields.html.erb
+++ b/app/views/projects/_project_user_fields.html.erb
@@ -5,7 +5,7 @@
<%= f.input :user_id,
as: :select,
label: "Facilitator",
- collection: @facilitators_array,
+ collection: @people_array,
include_blank: true,
selected: f.object&.user_id,
input_html: {
diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb
index 8796ec645..20272c2aa 100644
--- a/app/views/projects/show.html.erb
+++ b/app/views/projects/show.html.erb
@@ -89,7 +89,7 @@
<% @project.project_users.active.each do |pu| %>
-
- <%= pu.user.facilitator ? facilitator_profile_button(pu.user.facilitator) : pu.user.name %>
+ <%= pu.user.person ? person_profile_button(pu.user.person) : pu.user.name %>
<% if pu.position.present? %>
– <%= pu.title.presence || pu.position.humanize %>
<% end %>
diff --git a/app/views/shared/_navbar_menu.html.erb b/app/views/shared/_navbar_menu.html.erb
index 104b5ad7b..129f790fc 100644
--- a/app/views/shared/_navbar_menu.html.erb
+++ b/app/views/shared/_navbar_menu.html.erb
@@ -81,10 +81,10 @@
<% end %>
<% if current_user&.super_user %>
- <%= link_to facilitators_path,
+ <%= link_to people_path,
class: "admin-only bg-blue-100 flex items-center gap-2 px-4 py-2 text-sm text-gray-700 hover:bg-gray-100" do %>
- Facilitators
+ People
<% end %>
<%= link_to projects_path,
diff --git a/app/views/shared/_navbar_menu_mobile.html.erb b/app/views/shared/_navbar_menu_mobile.html.erb
index 5af6b8926..0ddc09980 100644
--- a/app/views/shared/_navbar_menu_mobile.html.erb
+++ b/app/views/shared/_navbar_menu_mobile.html.erb
@@ -63,10 +63,10 @@
<% end %>
<% if current_user&.super_user %>
- <%= link_to facilitators_path, class: "admin-only bg-blue-100 flex items-center px-4 py-2 text-sm text-white
+ <%= link_to people_path, class: "admin-only bg-blue-100 flex items-center px-4 py-2 text-sm text-white
hover:text-gray-700 hover:bg-gray-100 w-full space-x-2" do %>
- Facilitators
+ People
<% end %>
<%= link_to projects_path, class: "admin-only bg-blue-100 flex items-center px-4 py-2 text-sm text-white
hover:text-gray-700 hover:bg-gray-100 w-full space-x-2" do %>
diff --git a/app/views/shared/_navbar_user.html.erb b/app/views/shared/_navbar_user.html.erb
index a97f3e923..77a30f316 100644
--- a/app/views/shared/_navbar_user.html.erb
+++ b/app/views/shared/_navbar_user.html.erb
@@ -28,7 +28,7 @@
<% end %>
<% if current_user&.super_user %>
- <%= link_to (current_user.facilitator ? facilitator_path(current_user.facilitator) : generate_facilitator_user_path(current_user)),
+ <%= link_to (current_user.person ? person_path(current_user.person) : generate_person_user_path(current_user)),
class: "admin-only bg-blue-100 flex items-center px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full space-x-2" do %>
My profile
diff --git a/app/views/stories/_form.html.erb b/app/views/stories/_form.html.erb
index f8c564281..69983a8f2 100644
--- a/app/views/stories/_form.html.erb
+++ b/app/views/stories/_form.html.erb
@@ -84,7 +84,7 @@
selected: f.object.project_id || @story_idea&.project_id,
label: (f.object.created_by ? (
link_to "Story author",
- generate_facilitator_user_path(f.object.created_by),
+ generate_person_user_path(f.object.created_by),
class: "hover:underline") : "Story author").html_safe,
prompt: "Select User" %>
@@ -103,15 +103,15 @@
- <%= f.input :spotlighted_facilitator_id,
- collection: Facilitator.joins(:user).order("users.first_name, users.last_name"),
+ <%= f.input :spotlighted_person_id,
+ collection: Person.joins(:user).order("users.first_name, users.last_name"),
label_method: :full_name,
value_method: :id,
include_blank: true,
- selected: f.object.spotlighted_facilitator_id,
- label: (f.object.spotlighted_facilitator_id ? (link_to "Story spotlighted facilitator",
- facilitator_path(f.object.spotlighted_facilitator_id),
- class: "hover:underline") : "Story spotlighted facilitator").html_safe %>
+ selected: f.object.spotlighted_person_id,
+ label: (f.object.spotlighted_person_id ? (link_to "Story spotlighted person",
+ person_path(f.object.spotlighted_person_id),
+ class: "hover:underline") : "Story spotlighted person").html_safe %>
<%= f.hidden_field :updated_by_id, value: current_user.id %>
diff --git a/app/views/stories/show.html.erb b/app/views/stories/show.html.erb
index 21393efae..b395ebd2e 100644
--- a/app/views/stories/show.html.erb
+++ b/app/views/stories/show.html.erb
@@ -36,8 +36,8 @@
Story by:
<% author_credit = @story.story_idea&.author_credit || @story.created_by.full_name %>
- <% if @story.created_by.facilitator&.profile_is_searchable %>
- <%= link_to author_credit, facilitator_path(@story.created_by) %>
+ <% if @story.created_by.person&.profile_is_searchable %>
+ <%= link_to author_credit, person_path(@story.created_by) %>
<% else %>
<%= author_credit %>
<% end %>
diff --git a/app/views/users/_form.html.erb b/app/views/users/_form.html.erb
index 579455ff2..94ea1e08f 100644
--- a/app/views/users/_form.html.erb
+++ b/app/views/users/_form.html.erb
@@ -1,7 +1,7 @@
<%= simple_form_for @user, html: { multipart: true, class: "space-y-8" } do |f| %>
<%= render 'shared/errors', resource: user if user.errors.any? %>
- <%= f.hidden_field :facilitator_id, value: params[:facilitator_id] %>
+ <%= f.hidden_field :person_id, value: params[:person_id] %>
@@ -10,9 +10,9 @@
- <% if @facilitator %>
- <%= f.hidden_field :first_name, value: @facilitator.first_name %>
- <%= f.hidden_field :last_name, value: @facilitator.last_name %>
+ <% if @person %>
+ <%= f.hidden_field :first_name, value: @person.first_name %>
+ <%= f.hidden_field :last_name, value: @person.last_name %>
- <%= @facilitator.first_name %>
+ <%= @person.first_name %>
- Edit on <%= link_to "facilitator profile", facilitator_path(@facilitator), class: "underline" %>
+ Edit on <%= link_to "person profile", person_path(@person), class: "underline" %>
@@ -36,20 +36,20 @@
- <%= @facilitator.last_name %>
+ <%= @person.last_name %>
- Edit on <%= link_to "facilitator profile", facilitator_path(@facilitator), class: "underline" %>
+ Edit on <%= link_to "person profile", person_path(@person), class: "underline" %>
<% else %>
- Not associated with a facilitator!
+ Not associated with a person!
- <%= link_to "Create facilitator",
- new_facilitator_path(user_id: @user.id),
+ <%= link_to "Create person",
+ new_person_path(user_id: @user.id),
class: "btn btn-primary" if @user.persisted? %>
<% end %>
@@ -60,7 +60,7 @@
<%= f.input :email,
label: email_label_with_confirmation_icon(@user),
hint: "Only editable by admins",
- input_html: { value: f.object.email.presence || @facilitator&.email,
+ input_html: { value: f.object.email.presence || @person&.email,
class: "w-full" },
wrapper_html: { class: "w-full" },
label_html: { id: "email_label" } %>
@@ -85,7 +85,7 @@
- <%= f.object.email.presence || @facilitator&.email %>
+ <%= f.object.email.presence || @person&.email %>
diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb
index 6d646477e..d74cbdcc4 100644
--- a/app/views/users/edit.html.erb
+++ b/app/views/users/edit.html.erb
@@ -16,9 +16,9 @@
change_password_path,
class: "btn btn-secondary-outline" %>
<% end %>
- <%= link_to "Facilitator",
- facilitator_path(@user.facilitator),
- class: "btn btn-secondary-outline" if @user.facilitator %>
+ <%= link_to "Person",
+ person_path(@user.person),
+ class: "btn btn-secondary-outline" if @user.person %>
<%= link_to "View",
user_path(@user),
class: "btn btn-secondary-outline" %>
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb
index ad1c8d065..53c838ab2 100644
--- a/app/views/users/index.html.erb
+++ b/app/views/users/index.html.erb
@@ -38,11 +38,11 @@
- <% if user.facilitator %>
- <%= facilitator_profile_button(user.facilitator) %>
+ <% if user.person %>
+ <%= person_profile_button(user.person) %>
<% else %>
- <%= link_to "Create facilitator",
- new_facilitator_path(user_id: user.id),
+ <%= link_to "Create person",
+ new_person_path(user_id: user.id),
class: "btn btn-secondary-outline" %>
<% end %>
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 2f673f7e3..2379facf6 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -6,9 +6,9 @@
<% if current_user.super_user? %>
<%= link_to "Users", users_path, class: "btn btn-secondary-outline mr-2" %>
- <%= link_to "Facilitator profile",
- facilitator_path(@user.facilitator),
- class: "btn btn-secondary-outline mr-2" if @user.facilitator %>
+ <%= link_to "Person profile",
+ person_path(@user.person),
+ class: "btn btn-secondary-outline mr-2" if @user.person %>
<%= link_to "Edit", edit_user_path(@user), class: "btn btn-primary-outline" %>
<% end %>
@@ -53,11 +53,11 @@
- <% unless @user.facilitator %>
- Not associated with a facilitator!
+ <% unless @user.person %>
+ Not associated with a person!
- <%= link_to "Create facilitator",
- new_facilitator_path(user_id: @user.id),
+ <%= link_to "Create person",
+ new_person_path(user_id: @user.id),
class: "btn btn-primary" if @user.persisted? %>
<% end %>
diff --git a/app/views/workshop_logs/_index.html.erb b/app/views/workshop_logs/_index.html.erb
index c36844c68..0280dfd6f 100644
--- a/app/views/workshop_logs/_index.html.erb
+++ b/app/views/workshop_logs/_index.html.erb
@@ -77,7 +77,7 @@
<%= log.workshop ? link_to(log.workshop.title, workshop_path(log.workshop)) : "-" %>
- <%= log.user ? link_to(log.user.name, generate_facilitator_user_path(log.user)) : "—" %>
+ <%= log.user ? link_to(log.user.name, generate_person_user_path(log.user)) : "—" %>
<%= display_count(log.total_attendance) %>
diff --git a/app/views/workshop_logs/_search_boxes.html.erb b/app/views/workshop_logs/_search_boxes.html.erb
index cdaa2f1ad..3751874e8 100644
--- a/app/views/workshop_logs/_search_boxes.html.erb
+++ b/app/views/workshop_logs/_search_boxes.html.erb
@@ -37,8 +37,8 @@
<%= label_tag :user_id, "Facilitator", class: "text-sm font-medium text-gray-700 mb-1" %>
<%= select_tag :user_id,
- options_from_collection_for_select(@facilitators, :id, :name, params[:user_id]),
- include_blank: "All facilitators",
+ options_from_collection_for_select(@people, :id, :name, params[:user_id]),
+ include_blank: "All people",
class: "rounded-md border border-gray-300 px-3 py-2 text-gray-800 shadow-sm
focus:border-blue-500 focus:ring focus:ring-blue-200 focus:outline-none w-full",
onchange: "this.form.requestSubmit()" %>
diff --git a/app/views/workshop_variations/index.html.erb b/app/views/workshop_variations/index.html.erb
index 2e6cdbe81..aa25ce7f8 100644
--- a/app/views/workshop_variations/index.html.erb
+++ b/app/views/workshop_variations/index.html.erb
@@ -50,9 +50,9 @@
- <% if workshop_variation.created_by && workshop_variation.created_by.facilitator %>
+ <% if workshop_variation.created_by && workshop_variation.created_by.person %>
<%= link_to workshop_variation.created_by.full_name,
- facilitator_path(workshop_variation.created_by.facilitator),
+ person_path(workshop_variation.created_by.person),
class: "btn btn-secondary-outline" %>
<% elsif workshop_variation.created_by %>
<%= workshop_variation.created_by.full_name %>
diff --git a/app/views/workshops/_index_row.html.erb b/app/views/workshops/_index_row.html.erb
index ef840d84d..2672f5231 100644
--- a/app/views/workshops/_index_row.html.erb
+++ b/app/views/workshops/_index_row.html.erb
@@ -56,7 +56,7 @@
By:
<% if workshop.user %>
<%= link_to workshop.author_name,
- generate_facilitator_user_path(workshop.user),
+ generate_person_user_path(workshop.user),
class: "hover:underline",
data: { turbo: false } %>
<% else %>
diff --git a/app/views/workshops/_show_actions_row.html.erb b/app/views/workshops/_show_actions_row.html.erb
index cd6aa05af..e45e7610b 100644
--- a/app/views/workshops/_show_actions_row.html.erb
+++ b/app/views/workshops/_show_actions_row.html.erb
@@ -3,8 +3,8 @@
<%= render "bookmarks/editable_bookmark_button", resource: workshop.object %>
- <%= tag.span id: dom_id(workshop, :bookmark_count_facilitator), class: "text-gray-600 text-sm" do %>
- (Bookmarked by <%= pluralize(workshop.bookmarks.count, "facilitator") %>,
+ <%= tag.span id: dom_id(workshop, :bookmark_count_person), class: "text-gray-600 text-sm" do %>
+ (Bookmarked by <%= pluralize(workshop.bookmarks.count, "user") %>,
<% end %>
<%= tag.span id: dom_id(workshop, :led_count), class: "text-gray-600 text-sm" do %>
diff --git a/app/views/workshops/_show_associations.html.erb b/app/views/workshops/_show_associations.html.erb
index 0afc26ac3..2e0283644 100644
--- a/app/views/workshops/_show_associations.html.erb
+++ b/app/views/workshops/_show_associations.html.erb
@@ -57,7 +57,7 @@
- Related facilitator spotlight(s)
+ Related people spotlights
<% if current_user.super_user? && @workshop.persisted? %>
<%= link_to "New story",
diff --git a/config/routes.rb b/config/routes.rb
index eecf56ea6..7cb8f412b 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -58,7 +58,7 @@
resources :events do
resource :registrations, only: %i[create destroy], module: :events, as: :registrant_registration
end
- resources :facilitators
+ resources :people
resources :faqs
resources :notifications, only: [ :index, :show ]
resources :organizations
@@ -92,7 +92,7 @@
resources :tutorials
resources :users, only: [ :new, :index, :show, :edit, :update, :create, :destroy ] do
member do
- get :generate_facilitator
+ get :generate_person
post :send_reset_password_instructions
post :toggle_lock_status
post :confirm_email
diff --git a/db/migrate/20260204025110_rename_facilitators_to_people.rb b/db/migrate/20260204025110_rename_facilitators_to_people.rb
new file mode 100644
index 000000000..324135778
--- /dev/null
+++ b/db/migrate/20260204025110_rename_facilitators_to_people.rb
@@ -0,0 +1,5 @@
+class RenameFacilitatorsToPeople < ActiveRecord::Migration[8.1]
+ def change
+ rename_table :facilitators, :people
+ end
+end
diff --git a/db/migrate/20260204025111_rename_spotlighted_facilitator_to_spotlighted_person.rb b/db/migrate/20260204025111_rename_spotlighted_facilitator_to_spotlighted_person.rb
new file mode 100644
index 000000000..2e2fda816
--- /dev/null
+++ b/db/migrate/20260204025111_rename_spotlighted_facilitator_to_spotlighted_person.rb
@@ -0,0 +1,5 @@
+class RenameSpotlightedFacilitatorToSpotlightedPerson < ActiveRecord::Migration[8.1]
+ def change
+ rename_column :stories, :spotlighted_facilitator_id, :spotlighted_person_id
+ end
+end
diff --git a/spec/factories/facilitators.rb b/spec/factories/people.rb
similarity index 71%
rename from spec/factories/facilitators.rb
rename to spec/factories/people.rb
index 83b02ae88..30d1e116d 100644
--- a/spec/factories/facilitators.rb
+++ b/spec/factories/people.rb
@@ -1,5 +1,5 @@
FactoryBot.define do
- factory :facilitator do
+ factory :person do
association :user
association :created_by, factory: :user
association :updated_by, factory: :user
@@ -7,8 +7,8 @@
last_name { Faker::Name.last_name.gsub("'", " ") }
trait :with_organization do
- after(:create) do |facilitator|
- facilitator.organizations << create(:organization)
+ after(:create) do |person|
+ person.organizations << create(:organization)
end
end
end
diff --git a/spec/models/facilitator_spec.rb b/spec/models/person_spec.rb
similarity index 56%
rename from spec/models/facilitator_spec.rb
rename to spec/models/person_spec.rb
index e8dde26d1..846821004 100644
--- a/spec/models/facilitator_spec.rb
+++ b/spec/models/person_spec.rb
@@ -1,6 +1,6 @@
require "rails_helper"
-RSpec.describe Facilitator, type: :model do
+RSpec.describe Person, type: :model do
describe "associations" do
it { should have_one(:user) }
end
@@ -11,40 +11,40 @@
end
describe "#name" do
- let(:facilitator) { build(:facilitator, first_name: "Jane", last_name: "Doe") }
+ let(:person) { build(:person, first_name: "Jane", last_name: "Doe") }
context "when display_name_preference is full_name" do
it "returns the full name" do
- facilitator.display_name_preference = "full_name"
- expect(facilitator.name).to eq("Jane Doe")
+ person.display_name_preference = "full_name"
+ expect(person.name).to eq("Jane Doe")
end
end
context "when display_name_preference is first_name_last_initial" do
it "returns first name and last initial" do
- facilitator.display_name_preference = "first_name_last_initial"
- expect(facilitator.name).to eq("Jane D")
+ person.display_name_preference = "first_name_last_initial"
+ expect(person.name).to eq("Jane D")
end
end
context "when display_name_preference is first_name_only" do
it "returns only the first name" do
- facilitator.display_name_preference = "first_name_only"
- expect(facilitator.name).to eq("Jane")
+ person.display_name_preference = "first_name_only"
+ expect(person.name).to eq("Jane")
end
end
context "when display_name_preference is last_name_only" do
it "returns only the last name" do
- facilitator.display_name_preference = "last_name_only"
- expect(facilitator.name).to eq("Doe")
+ person.display_name_preference = "last_name_only"
+ expect(person.name).to eq("Doe")
end
end
context "when display_name_preference is nil or unknown" do
it "defaults to full name" do
- facilitator.display_name_preference = nil
- expect(facilitator.name).to eq("Jane Doe")
+ person.display_name_preference = nil
+ expect(person.name).to eq("Jane Doe")
end
end
end
diff --git a/spec/services/facilitator_from_user_service_spec.rb b/spec/services/person_from_user_service_spec.rb
similarity index 61%
rename from spec/services/facilitator_from_user_service_spec.rb
rename to spec/services/person_from_user_service_spec.rb
index 4f71ed05e..d8c940042 100644
--- a/spec/services/facilitator_from_user_service_spec.rb
+++ b/spec/services/person_from_user_service_spec.rb
@@ -2,7 +2,7 @@
require "rails_helper"
-RSpec.describe FacilitatorFromUserService do
+RSpec.describe PersonFromUserService do
subject(:service) { described_class.new(user: user) }
let(:user) do
@@ -30,15 +30,15 @@
end
describe "#call" do
- let(:facilitator) { service.call }
+ let(:person) { service.call }
- it "returns a new Facilitator" do
- expect(facilitator).to be_a(Facilitator)
- expect(facilitator).to be_new_record
+ it "returns a new Person" do
+ expect(person).to be_a(Person)
+ expect(person).to be_new_record
end
- it "hydrates facilitator attributes from the user" do
- expect(facilitator).to have_attributes(
+ it "hydrates person attributes from the user" do
+ expect(person).to have_attributes(
first_name: "Jane",
last_name: "Doe",
email: "jane@example.com",
@@ -50,7 +50,7 @@
end
it "builds contact methods from user phone fields" do
- contact_methods = facilitator.contact_methods
+ contact_methods = person.contact_methods
expect(contact_methods.size).to eq(2)
@@ -58,35 +58,35 @@
secondary_phone = contact_methods.reject(&:is_primary).first
expect(primary_phone).to have_attributes(
- kind: "phone",
- value: "111-111-1111",
- is_primary: true
- )
+ kind: "phone",
+ value: "111-111-1111",
+ is_primary: true
+ )
expect(secondary_phone).to have_attributes(
- kind: "phone",
- value: "222-222-2222"
- )
+ kind: "phone",
+ value: "222-222-2222"
+ )
end
it "builds addresses from user address fields" do
- addresses = facilitator.addresses
+ addresses = person.addresses
expect(addresses.size).to eq(2)
expect(addresses.first).to have_attributes(
- street_address: "123 Main St",
- city: "Boston",
- state: "MA",
- zip_code: "02101"
- )
-
- expect(addresses.second).to have_attributes(
- street_address: "456 Side St",
- city: "Cambridge",
+ street_address: "123 Main St",
+ city: "Boston",
state: "MA",
- zip_code: "02139"
+ zip_code: "02101"
)
+
+ expect(addresses.second).to have_attributes(
+ street_address: "456 Side St",
+ city: "Cambridge",
+ state: "MA",
+ zip_code: "02139"
+ )
end
context "when optional user fields are blank" do
@@ -104,13 +104,13 @@
end
it "does not build contact methods" do
- facilitator = service.call
- expect(facilitator.contact_methods).to be_empty
+ person = service.call
+ expect(person.contact_methods).to be_empty
end
it "still builds addresses (even if values are nil)" do
- facilitator = service.call
- expect(facilitator.addresses.size).to eq(2)
+ person = service.call
+ expect(person.addresses.size).to eq(2)
end
end
end
diff --git a/spec/system/facilitator_adds_event_to_calendar_test.rb b/spec/system/facilitator_adds_event_to_calendar_test.rb
index 88a25ac8f..9469304cd 100644
--- a/spec/system/facilitator_adds_event_to_calendar_test.rb
+++ b/spec/system/facilitator_adds_event_to_calendar_test.rb
@@ -5,7 +5,7 @@
context "When Facilitator is logged in" do
before do
user = create(:user)
- create(:facilitator, user: user)
+ create(:person, user: user)
@event = create(:event,
title: "Upcoming Workshop",
diff --git a/spec/system/facilitator_bookmarks_workshop_test.rb b/spec/system/facilitator_bookmarks_workshop_test.rb
index ebd5155d6..bc908bdc2 100644
--- a/spec/system/facilitator_bookmarks_workshop_test.rb
+++ b/spec/system/facilitator_bookmarks_workshop_test.rb
@@ -5,7 +5,7 @@
context "when facilitator is logged in" do
before do
user = create(:user)
- create(:facilitator, user: user)
+ create(:person, user: user)
adult_window = create(:windows_type, :adult)
@workshop_world = create(:workshop, title: 'The best workshop in the world', windows_type: adult_window)
diff --git a/spec/system/facilitator_changes_password_test.rb b/spec/system/facilitator_changes_password_test.rb
index 52aba955b..9a8720887 100644
--- a/spec/system/facilitator_changes_password_test.rb
+++ b/spec/system/facilitator_changes_password_test.rb
@@ -5,7 +5,7 @@
context 'when facilitator requests password change' do
before do
@user = create(:user)
- create(:facilitator, user: @user)
+ create(:person, user: @user)
end
it 'completes the full password reset flow successfully' do
diff --git a/spec/system/facilitator_downloads_resources_test.rb b/spec/system/facilitator_downloads_resources_test.rb
index 54a7732d7..dccad9bc6 100644
--- a/spec/system/facilitator_downloads_resources_test.rb
+++ b/spec/system/facilitator_downloads_resources_test.rb
@@ -27,7 +27,7 @@
driven_by :selenium_chrome_headless_download
- create(:facilitator, user: user)
+ create(:person, user: user)
create(:downloadable_asset, owner: resource)
clear_downloads
end
diff --git a/spec/system/facilitator_filters_workshops_test.rb b/spec/system/facilitator_filters_workshops_test.rb
index d80b8e3aa..7464922e8 100644
--- a/spec/system/facilitator_filters_workshops_test.rb
+++ b/spec/system/facilitator_filters_workshops_test.rb
@@ -14,7 +14,7 @@
let(:sector_education) { create(:sector, :published, name: "Education/Schools") }
before do
- create(:facilitator, user: user)
+ create(:person, user: user)
# Create test workshops
workshop_world = create(:workshop, title: 'The best workshop in the world', windows_type: adult_window, inactive: false)
@@ -173,7 +173,7 @@
let(:sector_lgbtqia) { create(:sector, :published, name: "LGBTQIA") }
before do
- create(:facilitator, user: admin)
+ create(:person, user: admin)
# Published workshop
published_workshop = create(:workshop,
diff --git a/spec/system/facilitator_registers_for_event_test.rb b/spec/system/facilitator_registers_for_event_test.rb
index 47f519481..0f1bab093 100644
--- a/spec/system/facilitator_registers_for_event_test.rb
+++ b/spec/system/facilitator_registers_for_event_test.rb
@@ -5,7 +5,7 @@
context "When Facilitator is logged in" do
before do
user = create(:user)
- create(:facilitator, user: user)
+ create(:person, user: user)
@event = create(:event,
title: "Upcoming Workshop",
diff --git a/spec/system/facilitator_searches_resources_test.rb b/spec/system/facilitator_searches_resources_test.rb
index ef2c474f0..7ebee9502 100644
--- a/spec/system/facilitator_searches_resources_test.rb
+++ b/spec/system/facilitator_searches_resources_test.rb
@@ -5,7 +5,7 @@
context "When user is logged in" do
before do
user = create(:user)
- create(:facilitator, user: user)
+ create(:person, user: user)
create(:resource, title: "Scholarship Application Guide", featured: true, kind: "Scholarship")
create(:resource, title: "Workshop Session Template", kind: "Template")
create(:resource, title: "Participant Handout Package", kind: "Handout")
diff --git a/spec/system/facilitator_searches_workshop_test.rb b/spec/system/facilitator_searches_workshop_test.rb
index 40d62231a..d00c5c96a 100644
--- a/spec/system/facilitator_searches_workshop_test.rb
+++ b/spec/system/facilitator_searches_workshop_test.rb
@@ -5,7 +5,7 @@
context "when facilitator is logged in" do
before do
user = create(:user)
- create(:facilitator, user: user)
+ create(:person, user: user)
adult_window = create(:windows_type, :adult)
workshop_world = create(:workshop, title: 'The best workshop in the world', windows_type: adult_window)
diff --git a/spec/system/facilitator_submits_story_test.rb b/spec/system/facilitator_submits_story_test.rb
index 04837e0cf..3812afcf4 100644
--- a/spec/system/facilitator_submits_story_test.rb
+++ b/spec/system/facilitator_submits_story_test.rb
@@ -9,7 +9,7 @@
create(:windows_type, :combined)
@user = create(:user)
- create(:facilitator, user: @user)
+ create(:person, user: @user)
sign_in @user
visit new_story_path
diff --git a/spec/system/facilitator_submits_workshop_idea_test.rb b/spec/system/facilitator_submits_workshop_idea_test.rb
index ad4f7c793..5f3c98bd7 100644
--- a/spec/system/facilitator_submits_workshop_idea_test.rb
+++ b/spec/system/facilitator_submits_workshop_idea_test.rb
@@ -10,7 +10,7 @@
create(:windows_type, :combined)
user = create(:user)
- create(:facilitator, user: user)
+ create(:person, user: user)
sign_in user
visit new_workshop_idea_path
diff --git a/spec/system/facilitator_submits_workshop_log_test.rb b/spec/system/facilitator_submits_workshop_log_test.rb
index 427121595..205eda919 100644
--- a/spec/system/facilitator_submits_workshop_log_test.rb
+++ b/spec/system/facilitator_submits_workshop_log_test.rb
@@ -5,7 +5,7 @@
context "when facilitator is logged in" do
before do
@user = create(:user)
- create(:facilitator, user: @user)
+ create(:person, user: @user)
adult_window = create(:windows_type, :adult)
@windows_type = create(:windows_type, short_name: "COMBINED")
diff --git a/spec/system/facilitator_views_featured_workshops_test.rb b/spec/system/facilitator_views_featured_workshops_test.rb
index ce0ce27e1..e0b9af00b 100644
--- a/spec/system/facilitator_views_featured_workshops_test.rb
+++ b/spec/system/facilitator_views_featured_workshops_test.rb
@@ -5,7 +5,7 @@
context "when facilitator is logged in" do
before do
user = create(:user)
- create(:facilitator, user: user)
+ create(:person, user: user)
adult_window = create(:windows_type, :adult)
create(:workshop, title: 'The best workshop in the world', windows_type: adult_window, featured: true)
create(:workshop, title: 'The best workshop on mars', windows_type: adult_window, featured: true)
diff --git a/spec/system/facilitator_views_popular_resources_test.rb b/spec/system/facilitator_views_popular_resources_test.rb
index a55c5e34b..509196063 100644
--- a/spec/system/facilitator_views_popular_resources_test.rb
+++ b/spec/system/facilitator_views_popular_resources_test.rb
@@ -5,7 +5,7 @@
context "when logged in" do
before do
@user = create(:user)
- create(:facilitator, user: @user)
+ create(:person, user: @user)
@popular_resource = create(:resource,
title: "Most Popular Resource",
featured: true,
diff --git a/spec/system/facilitator_views_workshop_logs_test.rb b/spec/system/facilitator_views_workshop_logs_test.rb
index 00fb91335..9fd510466 100644
--- a/spec/system/facilitator_views_workshop_logs_test.rb
+++ b/spec/system/facilitator_views_workshop_logs_test.rb
@@ -7,7 +7,7 @@
Capybara.current_session.current_window.resize_to(1920, 5000)
@user = create(:user)
- create(:facilitator, user: @user)
+ create(:person, user: @user)
windows_type = create(:windows_type, short_name: "COMBINED")
form_builder = FormBuilder.create!(windows_type_id: windows_type.id, name: "The form")
diff --git a/spec/system/facilitator_views_workshop_test.rb b/spec/system/facilitator_views_workshop_test.rb
index 5734ef605..cfeb16c9e 100644
--- a/spec/system/facilitator_views_workshop_test.rb
+++ b/spec/system/facilitator_views_workshop_test.rb
@@ -5,7 +5,7 @@
context "When facilitator is logged in" do
before do
user = create(:user)
- create(:facilitator, user: user)
+ create(:person, user: user)
adult_window = create(:windows_type, :adult)
@workshop_world = create(:workshop, title: 'The best workshop in the world', windows_type: adult_window)
@workshop_mars = create(:workshop, title: 'The best workshop on mars', windows_type: adult_window, featured: true, objective: 'take everyone to mars', materials: 'rocket', setup: 'make a rocket')
Events registered
- <% if @facilitator.event_registrations.any? %> + <% if @person.event_registrations.any? %>" + @@ -266,8 +266,8 @@ - <% if current_user.super_user || current_user == @facilitator.user %> -
@@ -281,12 +281,12 @@
- <% if @facilitator.profile_show_workshop_ideas? %>
+ <% if @person.profile_show_workshop_ideas? %>
Workshop ideas submitted
- <% if @facilitator.user && @facilitator.user.workshop_ideas_as_creator.any? %>
+ <% if @person.user && @person.user.workshop_ideas_as_creator.any? %>
- <% @facilitator.user.workshop_ideas_as_creator.order(created_at: :desc).each do |idea| %>
+ <% @person.user.workshop_ideas_as_creator.order(created_at: :desc).each do |idea| %>
<%= render "show_card",
record: idea.decorate, title_font_size: "text-sm" %>
<% end %>
@@ -298,12 +298,12 @@
<% end %>
- <% if @facilitator.profile_show_story_ideas? %>
+ <% if @person.profile_show_story_ideas? %>
Story ideas submitted
- <% if @facilitator.user && @facilitator.user.story_ideas_as_creator.any? %>
+ <% if @person.user && @person.user.story_ideas_as_creator.any? %>
- <% @facilitator.user.story_ideas_as_creator.order(created_at: :desc).each do |story_idea| %>
+ <% @person.user.story_ideas_as_creator.order(created_at: :desc).each do |story_idea| %>
<%= render "show_card",
record_title: story_idea.workshop_title,
record: story_idea.decorate, title_font_size: "text-sm" %>
@@ -316,12 +316,12 @@
<% end %>
- <% if @facilitator.profile_show_workshop_logs? %>
+ <% if @person.profile_show_workshop_logs? %>
Workshop logs submitted
- <% if @facilitator.user && @facilitator.user.workshop_logs.any? %>
+ <% if @person.user && @person.user.workshop_logs.any? %>
- <% @facilitator.user.workshop_logs.order(date: :desc, created_at: :desc).each do |workshop_log| %>
+ <% @person.user.workshop_logs.order(date: :desc, created_at: :desc).each do |workshop_log| %>
<%= render "show_card",
record_title: "#{workshop_log.workshop&.title ||
"Workshop log #" + workshop_log.id.to_s} - #{workshop_log.windows_type_name}",
diff --git a/app/views/projects/_form.html.erb b/app/views/projects/_form.html.erb
index bd8316059..3e5bbb89e 100644
--- a/app/views/projects/_form.html.erb
+++ b/app/views/projects/_form.html.erb
@@ -263,7 +263,7 @@
<% f.object.user && f.object.user.project_users.each do |pu| %>
- <%= pu.title || pu.position %> -
- <%= facilitator_profile_button(pu.user.facilitator) if pu.persisted? && pu.user.facilitator %>
+ <%= person_profile_button(pu.user.person) if pu.persisted? && pu.user.person %>
<% end %>
diff --git a/app/views/projects/_project_user_fields.html.erb b/app/views/projects/_project_user_fields.html.erb
index 424ed1913..9be10777b 100644
--- a/app/views/projects/_project_user_fields.html.erb
+++ b/app/views/projects/_project_user_fields.html.erb
@@ -5,7 +5,7 @@
<%= f.input :user_id,
as: :select,
label: "Facilitator",
- collection: @facilitators_array,
+ collection: @people_array,
include_blank: true,
selected: f.object&.user_id,
input_html: {
diff --git a/app/views/projects/show.html.erb b/app/views/projects/show.html.erb
index 8796ec645..20272c2aa 100644
--- a/app/views/projects/show.html.erb
+++ b/app/views/projects/show.html.erb
@@ -89,7 +89,7 @@
<% @project.project_users.active.each do |pu| %>
-
- <%= pu.user.facilitator ? facilitator_profile_button(pu.user.facilitator) : pu.user.name %>
+ <%= pu.user.person ? person_profile_button(pu.user.person) : pu.user.name %>
<% if pu.position.present? %>
– <%= pu.title.presence || pu.position.humanize %>
<% end %>
diff --git a/app/views/shared/_navbar_menu.html.erb b/app/views/shared/_navbar_menu.html.erb
index 104b5ad7b..129f790fc 100644
--- a/app/views/shared/_navbar_menu.html.erb
+++ b/app/views/shared/_navbar_menu.html.erb
@@ -81,10 +81,10 @@
<% end %>
<% if current_user&.super_user %>
- <%= link_to facilitators_path,
+ <%= link_to people_path,
class: "admin-only bg-blue-100 flex items-center gap-2 px-4 py-2 text-sm text-gray-700 hover:bg-gray-100" do %>
- Facilitators
+ People
<% end %>
<%= link_to projects_path,
diff --git a/app/views/shared/_navbar_menu_mobile.html.erb b/app/views/shared/_navbar_menu_mobile.html.erb
index 5af6b8926..0ddc09980 100644
--- a/app/views/shared/_navbar_menu_mobile.html.erb
+++ b/app/views/shared/_navbar_menu_mobile.html.erb
@@ -63,10 +63,10 @@
<% end %>
<% if current_user&.super_user %>
- <%= link_to facilitators_path, class: "admin-only bg-blue-100 flex items-center px-4 py-2 text-sm text-white
+ <%= link_to people_path, class: "admin-only bg-blue-100 flex items-center px-4 py-2 text-sm text-white
hover:text-gray-700 hover:bg-gray-100 w-full space-x-2" do %>
- Facilitators
+ People
<% end %>
<%= link_to projects_path, class: "admin-only bg-blue-100 flex items-center px-4 py-2 text-sm text-white
hover:text-gray-700 hover:bg-gray-100 w-full space-x-2" do %>
diff --git a/app/views/shared/_navbar_user.html.erb b/app/views/shared/_navbar_user.html.erb
index a97f3e923..77a30f316 100644
--- a/app/views/shared/_navbar_user.html.erb
+++ b/app/views/shared/_navbar_user.html.erb
@@ -28,7 +28,7 @@
<% end %>
<% if current_user&.super_user %>
- <%= link_to (current_user.facilitator ? facilitator_path(current_user.facilitator) : generate_facilitator_user_path(current_user)),
+ <%= link_to (current_user.person ? person_path(current_user.person) : generate_person_user_path(current_user)),
class: "admin-only bg-blue-100 flex items-center px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full space-x-2" do %>
My profile
diff --git a/app/views/stories/_form.html.erb b/app/views/stories/_form.html.erb
index f8c564281..69983a8f2 100644
--- a/app/views/stories/_form.html.erb
+++ b/app/views/stories/_form.html.erb
@@ -84,7 +84,7 @@
selected: f.object.project_id || @story_idea&.project_id,
label: (f.object.created_by ? (
link_to "Story author",
- generate_facilitator_user_path(f.object.created_by),
+ generate_person_user_path(f.object.created_by),
class: "hover:underline") : "Story author").html_safe,
prompt: "Select User" %>
@@ -103,15 +103,15 @@
- <%= f.input :spotlighted_facilitator_id,
- collection: Facilitator.joins(:user).order("users.first_name, users.last_name"),
+ <%= f.input :spotlighted_person_id,
+ collection: Person.joins(:user).order("users.first_name, users.last_name"),
label_method: :full_name,
value_method: :id,
include_blank: true,
- selected: f.object.spotlighted_facilitator_id,
- label: (f.object.spotlighted_facilitator_id ? (link_to "Story spotlighted facilitator",
- facilitator_path(f.object.spotlighted_facilitator_id),
- class: "hover:underline") : "Story spotlighted facilitator").html_safe %>
+ selected: f.object.spotlighted_person_id,
+ label: (f.object.spotlighted_person_id ? (link_to "Story spotlighted person",
+ person_path(f.object.spotlighted_person_id),
+ class: "hover:underline") : "Story spotlighted person").html_safe %>
<%= f.hidden_field :updated_by_id, value: current_user.id %>
diff --git a/app/views/stories/show.html.erb b/app/views/stories/show.html.erb
index 21393efae..b395ebd2e 100644
--- a/app/views/stories/show.html.erb
+++ b/app/views/stories/show.html.erb
@@ -36,8 +36,8 @@
Story by:
<% author_credit = @story.story_idea&.author_credit || @story.created_by.full_name %>
- <% if @story.created_by.facilitator&.profile_is_searchable %>
- <%= link_to author_credit, facilitator_path(@story.created_by) %>
+ <% if @story.created_by.person&.profile_is_searchable %>
+ <%= link_to author_credit, person_path(@story.created_by) %>
<% else %>
<%= author_credit %>
<% end %>
diff --git a/app/views/users/_form.html.erb b/app/views/users/_form.html.erb
index 579455ff2..94ea1e08f 100644
--- a/app/views/users/_form.html.erb
+++ b/app/views/users/_form.html.erb
@@ -1,7 +1,7 @@
<%= simple_form_for @user, html: { multipart: true, class: "space-y-8" } do |f| %>
<%= render 'shared/errors', resource: user if user.errors.any? %>
- <%= f.hidden_field :facilitator_id, value: params[:facilitator_id] %>
+ <%= f.hidden_field :person_id, value: params[:person_id] %>
@@ -10,9 +10,9 @@
- <% if @facilitator %>
- <%= f.hidden_field :first_name, value: @facilitator.first_name %>
- <%= f.hidden_field :last_name, value: @facilitator.last_name %>
+ <% if @person %>
+ <%= f.hidden_field :first_name, value: @person.first_name %>
+ <%= f.hidden_field :last_name, value: @person.last_name %>
- <%= @facilitator.first_name %>
+ <%= @person.first_name %>
- Edit on <%= link_to "facilitator profile", facilitator_path(@facilitator), class: "underline" %>
+ Edit on <%= link_to "person profile", person_path(@person), class: "underline" %>
@@ -36,20 +36,20 @@
- <%= @facilitator.last_name %>
+ <%= @person.last_name %>
- Edit on <%= link_to "facilitator profile", facilitator_path(@facilitator), class: "underline" %>
+ Edit on <%= link_to "person profile", person_path(@person), class: "underline" %>
<% else %>
- Not associated with a facilitator!
+ Not associated with a person!
- <%= link_to "Create facilitator",
- new_facilitator_path(user_id: @user.id),
+ <%= link_to "Create person",
+ new_person_path(user_id: @user.id),
class: "btn btn-primary" if @user.persisted? %>
<% end %>
@@ -60,7 +60,7 @@
<%= f.input :email,
label: email_label_with_confirmation_icon(@user),
hint: "Only editable by admins",
- input_html: { value: f.object.email.presence || @facilitator&.email,
+ input_html: { value: f.object.email.presence || @person&.email,
class: "w-full" },
wrapper_html: { class: "w-full" },
label_html: { id: "email_label" } %>
@@ -85,7 +85,7 @@
- <%= f.object.email.presence || @facilitator&.email %>
+ <%= f.object.email.presence || @person&.email %>
diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb
index 6d646477e..d74cbdcc4 100644
--- a/app/views/users/edit.html.erb
+++ b/app/views/users/edit.html.erb
@@ -16,9 +16,9 @@
change_password_path,
class: "btn btn-secondary-outline" %>
<% end %>
- <%= link_to "Facilitator",
- facilitator_path(@user.facilitator),
- class: "btn btn-secondary-outline" if @user.facilitator %>
+ <%= link_to "Person",
+ person_path(@user.person),
+ class: "btn btn-secondary-outline" if @user.person %>
<%= link_to "View",
user_path(@user),
class: "btn btn-secondary-outline" %>
diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb
index ad1c8d065..53c838ab2 100644
--- a/app/views/users/index.html.erb
+++ b/app/views/users/index.html.erb
@@ -38,11 +38,11 @@
- <% if user.facilitator %>
- <%= facilitator_profile_button(user.facilitator) %>
+ <% if user.person %>
+ <%= person_profile_button(user.person) %>
<% else %>
- <%= link_to "Create facilitator",
- new_facilitator_path(user_id: user.id),
+ <%= link_to "Create person",
+ new_person_path(user_id: user.id),
class: "btn btn-secondary-outline" %>
<% end %>
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb
index 2f673f7e3..2379facf6 100644
--- a/app/views/users/show.html.erb
+++ b/app/views/users/show.html.erb
@@ -6,9 +6,9 @@
<% if current_user.super_user? %>
<%= link_to "Users", users_path, class: "btn btn-secondary-outline mr-2" %>
- <%= link_to "Facilitator profile",
- facilitator_path(@user.facilitator),
- class: "btn btn-secondary-outline mr-2" if @user.facilitator %>
+ <%= link_to "Person profile",
+ person_path(@user.person),
+ class: "btn btn-secondary-outline mr-2" if @user.person %>
<%= link_to "Edit", edit_user_path(@user), class: "btn btn-primary-outline" %>
<% end %>
@@ -53,11 +53,11 @@
- <% unless @user.facilitator %>
- Not associated with a facilitator!
+ <% unless @user.person %>
+ Not associated with a person!
- <%= link_to "Create facilitator",
- new_facilitator_path(user_id: @user.id),
+ <%= link_to "Create person",
+ new_person_path(user_id: @user.id),
class: "btn btn-primary" if @user.persisted? %>
<% end %>
diff --git a/app/views/workshop_logs/_index.html.erb b/app/views/workshop_logs/_index.html.erb
index c36844c68..0280dfd6f 100644
--- a/app/views/workshop_logs/_index.html.erb
+++ b/app/views/workshop_logs/_index.html.erb
@@ -77,7 +77,7 @@
<%= log.workshop ? link_to(log.workshop.title, workshop_path(log.workshop)) : "-" %>
- <%= log.user ? link_to(log.user.name, generate_facilitator_user_path(log.user)) : "—" %>
+ <%= log.user ? link_to(log.user.name, generate_person_user_path(log.user)) : "—" %>
<%= display_count(log.total_attendance) %>
diff --git a/app/views/workshop_logs/_search_boxes.html.erb b/app/views/workshop_logs/_search_boxes.html.erb
index cdaa2f1ad..3751874e8 100644
--- a/app/views/workshop_logs/_search_boxes.html.erb
+++ b/app/views/workshop_logs/_search_boxes.html.erb
@@ -37,8 +37,8 @@
<%= label_tag :user_id, "Facilitator", class: "text-sm font-medium text-gray-700 mb-1" %>
<%= select_tag :user_id,
- options_from_collection_for_select(@facilitators, :id, :name, params[:user_id]),
- include_blank: "All facilitators",
+ options_from_collection_for_select(@people, :id, :name, params[:user_id]),
+ include_blank: "All people",
class: "rounded-md border border-gray-300 px-3 py-2 text-gray-800 shadow-sm
focus:border-blue-500 focus:ring focus:ring-blue-200 focus:outline-none w-full",
onchange: "this.form.requestSubmit()" %>
diff --git a/app/views/workshop_variations/index.html.erb b/app/views/workshop_variations/index.html.erb
index 2e6cdbe81..aa25ce7f8 100644
--- a/app/views/workshop_variations/index.html.erb
+++ b/app/views/workshop_variations/index.html.erb
@@ -50,9 +50,9 @@
- <% if workshop_variation.created_by && workshop_variation.created_by.facilitator %>
+ <% if workshop_variation.created_by && workshop_variation.created_by.person %>
<%= link_to workshop_variation.created_by.full_name,
- facilitator_path(workshop_variation.created_by.facilitator),
+ person_path(workshop_variation.created_by.person),
class: "btn btn-secondary-outline" %>
<% elsif workshop_variation.created_by %>
<%= workshop_variation.created_by.full_name %>
diff --git a/app/views/workshops/_index_row.html.erb b/app/views/workshops/_index_row.html.erb
index ef840d84d..2672f5231 100644
--- a/app/views/workshops/_index_row.html.erb
+++ b/app/views/workshops/_index_row.html.erb
@@ -56,7 +56,7 @@
By:
<% if workshop.user %>
<%= link_to workshop.author_name,
- generate_facilitator_user_path(workshop.user),
+ generate_person_user_path(workshop.user),
class: "hover:underline",
data: { turbo: false } %>
<% else %>
diff --git a/app/views/workshops/_show_actions_row.html.erb b/app/views/workshops/_show_actions_row.html.erb
index cd6aa05af..e45e7610b 100644
--- a/app/views/workshops/_show_actions_row.html.erb
+++ b/app/views/workshops/_show_actions_row.html.erb
@@ -3,8 +3,8 @@
<%= render "bookmarks/editable_bookmark_button", resource: workshop.object %>
- <%= tag.span id: dom_id(workshop, :bookmark_count_facilitator), class: "text-gray-600 text-sm" do %>
- (Bookmarked by <%= pluralize(workshop.bookmarks.count, "facilitator") %>,
+ <%= tag.span id: dom_id(workshop, :bookmark_count_person), class: "text-gray-600 text-sm" do %>
+ (Bookmarked by <%= pluralize(workshop.bookmarks.count, "user") %>,
<% end %>
<%= tag.span id: dom_id(workshop, :led_count), class: "text-gray-600 text-sm" do %>
diff --git a/app/views/workshops/_show_associations.html.erb b/app/views/workshops/_show_associations.html.erb
index 0afc26ac3..2e0283644 100644
--- a/app/views/workshops/_show_associations.html.erb
+++ b/app/views/workshops/_show_associations.html.erb
@@ -57,7 +57,7 @@
- Related facilitator spotlight(s)
+ Related people spotlights
<% if current_user.super_user? && @workshop.persisted? %>
<%= link_to "New story",
diff --git a/config/routes.rb b/config/routes.rb
index eecf56ea6..7cb8f412b 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -58,7 +58,7 @@
resources :events do
resource :registrations, only: %i[create destroy], module: :events, as: :registrant_registration
end
- resources :facilitators
+ resources :people
resources :faqs
resources :notifications, only: [ :index, :show ]
resources :organizations
@@ -92,7 +92,7 @@
resources :tutorials
resources :users, only: [ :new, :index, :show, :edit, :update, :create, :destroy ] do
member do
- get :generate_facilitator
+ get :generate_person
post :send_reset_password_instructions
post :toggle_lock_status
post :confirm_email
diff --git a/db/migrate/20260204025110_rename_facilitators_to_people.rb b/db/migrate/20260204025110_rename_facilitators_to_people.rb
new file mode 100644
index 000000000..324135778
--- /dev/null
+++ b/db/migrate/20260204025110_rename_facilitators_to_people.rb
@@ -0,0 +1,5 @@
+class RenameFacilitatorsToPeople < ActiveRecord::Migration[8.1]
+ def change
+ rename_table :facilitators, :people
+ end
+end
diff --git a/db/migrate/20260204025111_rename_spotlighted_facilitator_to_spotlighted_person.rb b/db/migrate/20260204025111_rename_spotlighted_facilitator_to_spotlighted_person.rb
new file mode 100644
index 000000000..2e2fda816
--- /dev/null
+++ b/db/migrate/20260204025111_rename_spotlighted_facilitator_to_spotlighted_person.rb
@@ -0,0 +1,5 @@
+class RenameSpotlightedFacilitatorToSpotlightedPerson < ActiveRecord::Migration[8.1]
+ def change
+ rename_column :stories, :spotlighted_facilitator_id, :spotlighted_person_id
+ end
+end
diff --git a/spec/factories/facilitators.rb b/spec/factories/people.rb
similarity index 71%
rename from spec/factories/facilitators.rb
rename to spec/factories/people.rb
index 83b02ae88..30d1e116d 100644
--- a/spec/factories/facilitators.rb
+++ b/spec/factories/people.rb
@@ -1,5 +1,5 @@
FactoryBot.define do
- factory :facilitator do
+ factory :person do
association :user
association :created_by, factory: :user
association :updated_by, factory: :user
@@ -7,8 +7,8 @@
last_name { Faker::Name.last_name.gsub("'", " ") }
trait :with_organization do
- after(:create) do |facilitator|
- facilitator.organizations << create(:organization)
+ after(:create) do |person|
+ person.organizations << create(:organization)
end
end
end
diff --git a/spec/models/facilitator_spec.rb b/spec/models/person_spec.rb
similarity index 56%
rename from spec/models/facilitator_spec.rb
rename to spec/models/person_spec.rb
index e8dde26d1..846821004 100644
--- a/spec/models/facilitator_spec.rb
+++ b/spec/models/person_spec.rb
@@ -1,6 +1,6 @@
require "rails_helper"
-RSpec.describe Facilitator, type: :model do
+RSpec.describe Person, type: :model do
describe "associations" do
it { should have_one(:user) }
end
@@ -11,40 +11,40 @@
end
describe "#name" do
- let(:facilitator) { build(:facilitator, first_name: "Jane", last_name: "Doe") }
+ let(:person) { build(:person, first_name: "Jane", last_name: "Doe") }
context "when display_name_preference is full_name" do
it "returns the full name" do
- facilitator.display_name_preference = "full_name"
- expect(facilitator.name).to eq("Jane Doe")
+ person.display_name_preference = "full_name"
+ expect(person.name).to eq("Jane Doe")
end
end
context "when display_name_preference is first_name_last_initial" do
it "returns first name and last initial" do
- facilitator.display_name_preference = "first_name_last_initial"
- expect(facilitator.name).to eq("Jane D")
+ person.display_name_preference = "first_name_last_initial"
+ expect(person.name).to eq("Jane D")
end
end
context "when display_name_preference is first_name_only" do
it "returns only the first name" do
- facilitator.display_name_preference = "first_name_only"
- expect(facilitator.name).to eq("Jane")
+ person.display_name_preference = "first_name_only"
+ expect(person.name).to eq("Jane")
end
end
context "when display_name_preference is last_name_only" do
it "returns only the last name" do
- facilitator.display_name_preference = "last_name_only"
- expect(facilitator.name).to eq("Doe")
+ person.display_name_preference = "last_name_only"
+ expect(person.name).to eq("Doe")
end
end
context "when display_name_preference is nil or unknown" do
it "defaults to full name" do
- facilitator.display_name_preference = nil
- expect(facilitator.name).to eq("Jane Doe")
+ person.display_name_preference = nil
+ expect(person.name).to eq("Jane Doe")
end
end
end
diff --git a/spec/services/facilitator_from_user_service_spec.rb b/spec/services/person_from_user_service_spec.rb
similarity index 61%
rename from spec/services/facilitator_from_user_service_spec.rb
rename to spec/services/person_from_user_service_spec.rb
index 4f71ed05e..d8c940042 100644
--- a/spec/services/facilitator_from_user_service_spec.rb
+++ b/spec/services/person_from_user_service_spec.rb
@@ -2,7 +2,7 @@
require "rails_helper"
-RSpec.describe FacilitatorFromUserService do
+RSpec.describe PersonFromUserService do
subject(:service) { described_class.new(user: user) }
let(:user) do
@@ -30,15 +30,15 @@
end
describe "#call" do
- let(:facilitator) { service.call }
+ let(:person) { service.call }
- it "returns a new Facilitator" do
- expect(facilitator).to be_a(Facilitator)
- expect(facilitator).to be_new_record
+ it "returns a new Person" do
+ expect(person).to be_a(Person)
+ expect(person).to be_new_record
end
- it "hydrates facilitator attributes from the user" do
- expect(facilitator).to have_attributes(
+ it "hydrates person attributes from the user" do
+ expect(person).to have_attributes(
first_name: "Jane",
last_name: "Doe",
email: "jane@example.com",
@@ -50,7 +50,7 @@
end
it "builds contact methods from user phone fields" do
- contact_methods = facilitator.contact_methods
+ contact_methods = person.contact_methods
expect(contact_methods.size).to eq(2)
@@ -58,35 +58,35 @@
secondary_phone = contact_methods.reject(&:is_primary).first
expect(primary_phone).to have_attributes(
- kind: "phone",
- value: "111-111-1111",
- is_primary: true
- )
+ kind: "phone",
+ value: "111-111-1111",
+ is_primary: true
+ )
expect(secondary_phone).to have_attributes(
- kind: "phone",
- value: "222-222-2222"
- )
+ kind: "phone",
+ value: "222-222-2222"
+ )
end
it "builds addresses from user address fields" do
- addresses = facilitator.addresses
+ addresses = person.addresses
expect(addresses.size).to eq(2)
expect(addresses.first).to have_attributes(
- street_address: "123 Main St",
- city: "Boston",
- state: "MA",
- zip_code: "02101"
- )
-
- expect(addresses.second).to have_attributes(
- street_address: "456 Side St",
- city: "Cambridge",
+ street_address: "123 Main St",
+ city: "Boston",
state: "MA",
- zip_code: "02139"
+ zip_code: "02101"
)
+
+ expect(addresses.second).to have_attributes(
+ street_address: "456 Side St",
+ city: "Cambridge",
+ state: "MA",
+ zip_code: "02139"
+ )
end
context "when optional user fields are blank" do
@@ -104,13 +104,13 @@
end
it "does not build contact methods" do
- facilitator = service.call
- expect(facilitator.contact_methods).to be_empty
+ person = service.call
+ expect(person.contact_methods).to be_empty
end
it "still builds addresses (even if values are nil)" do
- facilitator = service.call
- expect(facilitator.addresses.size).to eq(2)
+ person = service.call
+ expect(person.addresses.size).to eq(2)
end
end
end
diff --git a/spec/system/facilitator_adds_event_to_calendar_test.rb b/spec/system/facilitator_adds_event_to_calendar_test.rb
index 88a25ac8f..9469304cd 100644
--- a/spec/system/facilitator_adds_event_to_calendar_test.rb
+++ b/spec/system/facilitator_adds_event_to_calendar_test.rb
@@ -5,7 +5,7 @@
context "When Facilitator is logged in" do
before do
user = create(:user)
- create(:facilitator, user: user)
+ create(:person, user: user)
@event = create(:event,
title: "Upcoming Workshop",
diff --git a/spec/system/facilitator_bookmarks_workshop_test.rb b/spec/system/facilitator_bookmarks_workshop_test.rb
index ebd5155d6..bc908bdc2 100644
--- a/spec/system/facilitator_bookmarks_workshop_test.rb
+++ b/spec/system/facilitator_bookmarks_workshop_test.rb
@@ -5,7 +5,7 @@
context "when facilitator is logged in" do
before do
user = create(:user)
- create(:facilitator, user: user)
+ create(:person, user: user)
adult_window = create(:windows_type, :adult)
@workshop_world = create(:workshop, title: 'The best workshop in the world', windows_type: adult_window)
diff --git a/spec/system/facilitator_changes_password_test.rb b/spec/system/facilitator_changes_password_test.rb
index 52aba955b..9a8720887 100644
--- a/spec/system/facilitator_changes_password_test.rb
+++ b/spec/system/facilitator_changes_password_test.rb
@@ -5,7 +5,7 @@
context 'when facilitator requests password change' do
before do
@user = create(:user)
- create(:facilitator, user: @user)
+ create(:person, user: @user)
end
it 'completes the full password reset flow successfully' do
diff --git a/spec/system/facilitator_downloads_resources_test.rb b/spec/system/facilitator_downloads_resources_test.rb
index 54a7732d7..dccad9bc6 100644
--- a/spec/system/facilitator_downloads_resources_test.rb
+++ b/spec/system/facilitator_downloads_resources_test.rb
@@ -27,7 +27,7 @@
driven_by :selenium_chrome_headless_download
- create(:facilitator, user: user)
+ create(:person, user: user)
create(:downloadable_asset, owner: resource)
clear_downloads
end
diff --git a/spec/system/facilitator_filters_workshops_test.rb b/spec/system/facilitator_filters_workshops_test.rb
index d80b8e3aa..7464922e8 100644
--- a/spec/system/facilitator_filters_workshops_test.rb
+++ b/spec/system/facilitator_filters_workshops_test.rb
@@ -14,7 +14,7 @@
let(:sector_education) { create(:sector, :published, name: "Education/Schools") }
before do
- create(:facilitator, user: user)
+ create(:person, user: user)
# Create test workshops
workshop_world = create(:workshop, title: 'The best workshop in the world', windows_type: adult_window, inactive: false)
@@ -173,7 +173,7 @@
let(:sector_lgbtqia) { create(:sector, :published, name: "LGBTQIA") }
before do
- create(:facilitator, user: admin)
+ create(:person, user: admin)
# Published workshop
published_workshop = create(:workshop,
diff --git a/spec/system/facilitator_registers_for_event_test.rb b/spec/system/facilitator_registers_for_event_test.rb
index 47f519481..0f1bab093 100644
--- a/spec/system/facilitator_registers_for_event_test.rb
+++ b/spec/system/facilitator_registers_for_event_test.rb
@@ -5,7 +5,7 @@
context "When Facilitator is logged in" do
before do
user = create(:user)
- create(:facilitator, user: user)
+ create(:person, user: user)
@event = create(:event,
title: "Upcoming Workshop",
diff --git a/spec/system/facilitator_searches_resources_test.rb b/spec/system/facilitator_searches_resources_test.rb
index ef2c474f0..7ebee9502 100644
--- a/spec/system/facilitator_searches_resources_test.rb
+++ b/spec/system/facilitator_searches_resources_test.rb
@@ -5,7 +5,7 @@
context "When user is logged in" do
before do
user = create(:user)
- create(:facilitator, user: user)
+ create(:person, user: user)
create(:resource, title: "Scholarship Application Guide", featured: true, kind: "Scholarship")
create(:resource, title: "Workshop Session Template", kind: "Template")
create(:resource, title: "Participant Handout Package", kind: "Handout")
diff --git a/spec/system/facilitator_searches_workshop_test.rb b/spec/system/facilitator_searches_workshop_test.rb
index 40d62231a..d00c5c96a 100644
--- a/spec/system/facilitator_searches_workshop_test.rb
+++ b/spec/system/facilitator_searches_workshop_test.rb
@@ -5,7 +5,7 @@
context "when facilitator is logged in" do
before do
user = create(:user)
- create(:facilitator, user: user)
+ create(:person, user: user)
adult_window = create(:windows_type, :adult)
workshop_world = create(:workshop, title: 'The best workshop in the world', windows_type: adult_window)
diff --git a/spec/system/facilitator_submits_story_test.rb b/spec/system/facilitator_submits_story_test.rb
index 04837e0cf..3812afcf4 100644
--- a/spec/system/facilitator_submits_story_test.rb
+++ b/spec/system/facilitator_submits_story_test.rb
@@ -9,7 +9,7 @@
create(:windows_type, :combined)
@user = create(:user)
- create(:facilitator, user: @user)
+ create(:person, user: @user)
sign_in @user
visit new_story_path
diff --git a/spec/system/facilitator_submits_workshop_idea_test.rb b/spec/system/facilitator_submits_workshop_idea_test.rb
index ad4f7c793..5f3c98bd7 100644
--- a/spec/system/facilitator_submits_workshop_idea_test.rb
+++ b/spec/system/facilitator_submits_workshop_idea_test.rb
@@ -10,7 +10,7 @@
create(:windows_type, :combined)
user = create(:user)
- create(:facilitator, user: user)
+ create(:person, user: user)
sign_in user
visit new_workshop_idea_path
diff --git a/spec/system/facilitator_submits_workshop_log_test.rb b/spec/system/facilitator_submits_workshop_log_test.rb
index 427121595..205eda919 100644
--- a/spec/system/facilitator_submits_workshop_log_test.rb
+++ b/spec/system/facilitator_submits_workshop_log_test.rb
@@ -5,7 +5,7 @@
context "when facilitator is logged in" do
before do
@user = create(:user)
- create(:facilitator, user: @user)
+ create(:person, user: @user)
adult_window = create(:windows_type, :adult)
@windows_type = create(:windows_type, short_name: "COMBINED")
diff --git a/spec/system/facilitator_views_featured_workshops_test.rb b/spec/system/facilitator_views_featured_workshops_test.rb
index ce0ce27e1..e0b9af00b 100644
--- a/spec/system/facilitator_views_featured_workshops_test.rb
+++ b/spec/system/facilitator_views_featured_workshops_test.rb
@@ -5,7 +5,7 @@
context "when facilitator is logged in" do
before do
user = create(:user)
- create(:facilitator, user: user)
+ create(:person, user: user)
adult_window = create(:windows_type, :adult)
create(:workshop, title: 'The best workshop in the world', windows_type: adult_window, featured: true)
create(:workshop, title: 'The best workshop on mars', windows_type: adult_window, featured: true)
diff --git a/spec/system/facilitator_views_popular_resources_test.rb b/spec/system/facilitator_views_popular_resources_test.rb
index a55c5e34b..509196063 100644
--- a/spec/system/facilitator_views_popular_resources_test.rb
+++ b/spec/system/facilitator_views_popular_resources_test.rb
@@ -5,7 +5,7 @@
context "when logged in" do
before do
@user = create(:user)
- create(:facilitator, user: @user)
+ create(:person, user: @user)
@popular_resource = create(:resource,
title: "Most Popular Resource",
featured: true,
diff --git a/spec/system/facilitator_views_workshop_logs_test.rb b/spec/system/facilitator_views_workshop_logs_test.rb
index 00fb91335..9fd510466 100644
--- a/spec/system/facilitator_views_workshop_logs_test.rb
+++ b/spec/system/facilitator_views_workshop_logs_test.rb
@@ -7,7 +7,7 @@
Capybara.current_session.current_window.resize_to(1920, 5000)
@user = create(:user)
- create(:facilitator, user: @user)
+ create(:person, user: @user)
windows_type = create(:windows_type, short_name: "COMBINED")
form_builder = FormBuilder.create!(windows_type_id: windows_type.id, name: "The form")
diff --git a/spec/system/facilitator_views_workshop_test.rb b/spec/system/facilitator_views_workshop_test.rb
index 5734ef605..cfeb16c9e 100644
--- a/spec/system/facilitator_views_workshop_test.rb
+++ b/spec/system/facilitator_views_workshop_test.rb
@@ -5,7 +5,7 @@
context "When facilitator is logged in" do
before do
user = create(:user)
- create(:facilitator, user: user)
+ create(:person, user: user)
adult_window = create(:windows_type, :adult)
@workshop_world = create(:workshop, title: 'The best workshop in the world', windows_type: adult_window)
@workshop_mars = create(:workshop, title: 'The best workshop on mars', windows_type: adult_window, featured: true, objective: 'take everyone to mars', materials: 'rocket', setup: 'make a rocket')
Workshop ideas submitted
- <% if @facilitator.user && @facilitator.user.workshop_ideas_as_creator.any? %> + <% if @person.user && @person.user.workshop_ideas_as_creator.any? %>Story ideas submitted
- <% if @facilitator.user && @facilitator.user.story_ideas_as_creator.any? %> + <% if @person.user && @person.user.story_ideas_as_creator.any? %>Workshop logs submitted
- <% if @facilitator.user && @facilitator.user.workshop_logs.any? %> + <% if @person.user && @person.user.workshop_logs.any? %>-
<% @project.project_users.active.each do |pu| %>
- - <%= pu.user.facilitator ? facilitator_profile_button(pu.user.facilitator) : pu.user.name %> + <%= pu.user.person ? person_profile_button(pu.user.person) : pu.user.name %> <% if pu.position.present? %> – <%= pu.title.presence || pu.position.humanize %> <% end %> diff --git a/app/views/shared/_navbar_menu.html.erb b/app/views/shared/_navbar_menu.html.erb index 104b5ad7b..129f790fc 100644 --- a/app/views/shared/_navbar_menu.html.erb +++ b/app/views/shared/_navbar_menu.html.erb @@ -81,10 +81,10 @@ <% end %> <% if current_user&.super_user %> - <%= link_to facilitators_path, + <%= link_to people_path, class: "admin-only bg-blue-100 flex items-center gap-2 px-4 py-2 text-sm text-gray-700 hover:bg-gray-100" do %> - Facilitators + People <% end %> <%= link_to projects_path, diff --git a/app/views/shared/_navbar_menu_mobile.html.erb b/app/views/shared/_navbar_menu_mobile.html.erb index 5af6b8926..0ddc09980 100644 --- a/app/views/shared/_navbar_menu_mobile.html.erb +++ b/app/views/shared/_navbar_menu_mobile.html.erb @@ -63,10 +63,10 @@ <% end %> <% if current_user&.super_user %> - <%= link_to facilitators_path, class: "admin-only bg-blue-100 flex items-center px-4 py-2 text-sm text-white + <%= link_to people_path, class: "admin-only bg-blue-100 flex items-center px-4 py-2 text-sm text-white hover:text-gray-700 hover:bg-gray-100 w-full space-x-2" do %> - Facilitators + People <% end %> <%= link_to projects_path, class: "admin-only bg-blue-100 flex items-center px-4 py-2 text-sm text-white hover:text-gray-700 hover:bg-gray-100 w-full space-x-2" do %> diff --git a/app/views/shared/_navbar_user.html.erb b/app/views/shared/_navbar_user.html.erb index a97f3e923..77a30f316 100644 --- a/app/views/shared/_navbar_user.html.erb +++ b/app/views/shared/_navbar_user.html.erb @@ -28,7 +28,7 @@ <% end %> <% if current_user&.super_user %> - <%= link_to (current_user.facilitator ? facilitator_path(current_user.facilitator) : generate_facilitator_user_path(current_user)), + <%= link_to (current_user.person ? person_path(current_user.person) : generate_person_user_path(current_user)), class: "admin-only bg-blue-100 flex items-center px-4 py-2 text-sm text-gray-700 hover:bg-gray-100 w-full space-x-2" do %> My profile diff --git a/app/views/stories/_form.html.erb b/app/views/stories/_form.html.erb index f8c564281..69983a8f2 100644 --- a/app/views/stories/_form.html.erb +++ b/app/views/stories/_form.html.erb @@ -84,7 +84,7 @@ selected: f.object.project_id || @story_idea&.project_id, label: (f.object.created_by ? ( link_to "Story author", - generate_facilitator_user_path(f.object.created_by), + generate_person_user_path(f.object.created_by), class: "hover:underline") : "Story author").html_safe, prompt: "Select User" %> @@ -103,15 +103,15 @@
Story by: <% author_credit = @story.story_idea&.author_credit || @story.created_by.full_name %> - <% if @story.created_by.facilitator&.profile_is_searchable %> - <%= link_to author_credit, facilitator_path(@story.created_by) %> + <% if @story.created_by.person&.profile_is_searchable %> + <%= link_to author_credit, person_path(@story.created_by) %> <% else %> <%= author_credit %> <% end %> diff --git a/app/views/users/_form.html.erb b/app/views/users/_form.html.erb index 579455ff2..94ea1e08f 100644 --- a/app/views/users/_form.html.erb +++ b/app/views/users/_form.html.erb @@ -1,7 +1,7 @@ <%= simple_form_for @user, html: { multipart: true, class: "space-y-8" } do |f| %> <%= render 'shared/errors', resource: user if user.errors.any? %> - <%= f.hidden_field :facilitator_id, value: params[:facilitator_id] %> + <%= f.hidden_field :person_id, value: params[:person_id] %> @@ -10,9 +10,9 @@
- Edit on <%= link_to "facilitator profile", facilitator_path(@facilitator), class: "underline" %> + Edit on <%= link_to "person profile", person_path(@person), class: "underline" %>
- Edit on <%= link_to "facilitator profile", facilitator_path(@facilitator), class: "underline" %> + Edit on <%= link_to "person profile", person_path(@person), class: "underline" %>
- <%= link_to "Create facilitator", - new_facilitator_path(user_id: @user.id), + <%= link_to "Create person", + new_person_path(user_id: @user.id), class: "btn btn-primary" if @user.persisted? %>
diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index 6d646477e..d74cbdcc4 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb @@ -16,9 +16,9 @@ change_password_path, class: "btn btn-secondary-outline" %> <% end %> - <%= link_to "Facilitator", - facilitator_path(@user.facilitator), - class: "btn btn-secondary-outline" if @user.facilitator %> + <%= link_to "Person", + person_path(@user.person), + class: "btn btn-secondary-outline" if @user.person %> <%= link_to "View", user_path(@user), class: "btn btn-secondary-outline" %> diff --git a/app/views/users/index.html.erb b/app/views/users/index.html.erb index ad1c8d065..53c838ab2 100644 --- a/app/views/users/index.html.erb +++ b/app/views/users/index.html.erb @@ -38,11 +38,11 @@
- <%= link_to "Create facilitator", - new_facilitator_path(user_id: @user.id), + <%= link_to "Create person", + new_person_path(user_id: @user.id), class: "btn btn-primary" if @user.persisted? %> <% end %>