effective_memberships 0.2.6 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/concerns/effective_memberships_applicant.rb +5 -5
- data/app/models/effective/applicant_course.rb +1 -1
- data/app/models/effective/applicant_education.rb +1 -1
- data/app/models/effective/applicant_experience.rb +1 -1
- data/app/models/effective/applicant_reference.rb +1 -1
- data/db/migrate/01_create_effective_memberships.rb.erb +7 -0
- data/lib/effective_memberships/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 299989dcd361fdf24b0ba06461caaf5708934a416c356c9a24ab088bad96e4bb
|
4
|
+
data.tar.gz: b2ea47e531173ce84ca9732f75f1d9d4dd3f82f0f382fc6723d4efdc3124f455
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 520f5f62ef9b6faa7d281a93055cf078fc3138ce29c0a176852c6ee3504ea3412936166463e3fd0603b19fe627e1ea5c1074457ecedf238b5d2f6b98e1983f53
|
7
|
+
data.tar.gz: 96ccdbb68a88d7faeb8c97addc37b4f85d7c96a2c36d9967309e4edb50e8c27a793387a96c29ea0a18a8999287338a65cdae6d76b9606f700eca2803f12edb28
|
@@ -77,20 +77,20 @@ module EffectiveMembershipsApplicant
|
|
77
77
|
belongs_to :category, polymorphic: true, optional: true
|
78
78
|
belongs_to :from_category, polymorphic: true, optional: true
|
79
79
|
|
80
|
-
has_many :applicant_reviews, -> { order(:id) },
|
80
|
+
has_many :applicant_reviews, -> { order(:id) }, as: :applicant, dependent: :destroy
|
81
81
|
accepts_nested_attributes_for :applicant_reviews, reject_if: :all_blank, allow_destroy: true
|
82
82
|
|
83
83
|
# Effective Namespace
|
84
|
-
has_many :applicant_courses, -> { order(:id) }, class_name: 'Effective::ApplicantCourse',
|
84
|
+
has_many :applicant_courses, -> { order(:id) }, class_name: 'Effective::ApplicantCourse', as: :applicant, dependent: :destroy
|
85
85
|
accepts_nested_attributes_for :applicant_courses, reject_if: :all_blank, allow_destroy: true
|
86
86
|
|
87
|
-
has_many :applicant_educations, -> { order(:id) }, class_name: 'Effective::ApplicantEducation',
|
87
|
+
has_many :applicant_educations, -> { order(:id) }, class_name: 'Effective::ApplicantEducation', as: :applicant, dependent: :destroy
|
88
88
|
accepts_nested_attributes_for :applicant_educations, reject_if: :all_blank, allow_destroy: true
|
89
89
|
|
90
|
-
has_many :applicant_experiences, -> { order(:id) }, class_name: 'Effective::ApplicantExperience',
|
90
|
+
has_many :applicant_experiences, -> { order(:id) }, class_name: 'Effective::ApplicantExperience', as: :applicant, dependent: :destroy
|
91
91
|
accepts_nested_attributes_for :applicant_experiences, reject_if: :all_blank, allow_destroy: true
|
92
92
|
|
93
|
-
has_many :applicant_references, -> { order(:id) }, class_name: 'Effective::ApplicantReference',
|
93
|
+
has_many :applicant_references, -> { order(:id) }, class_name: 'Effective::ApplicantReference', as: :applicant, dependent: :destroy
|
94
94
|
accepts_nested_attributes_for :applicant_references, reject_if: :all_blank, allow_destroy: true
|
95
95
|
|
96
96
|
has_many :fees, -> { order(:id) }, as: :parent, class_name: 'Effective::Fee', dependent: :nullify
|
@@ -5,7 +5,7 @@ module Effective
|
|
5
5
|
acts_as_statused :submitted, :completed
|
6
6
|
log_changes(to: :applicant) if respond_to?(:log_changes)
|
7
7
|
|
8
|
-
belongs_to :applicant
|
8
|
+
belongs_to :applicant, polymorphic: true
|
9
9
|
|
10
10
|
KNOWNS = ['6 months - 1 year', '1 year - 2 years', '2 - 5 years', '5 - 10 years', 'More than 10 years']
|
11
11
|
RELATIONSHIPS = ['Supervisor', 'Employer', 'Colleague', 'Other']
|
@@ -172,6 +172,7 @@ class CreateEffectiveMemberships < ActiveRecord::Migration[6.0]
|
|
172
172
|
# Applicant Educations
|
173
173
|
create_table :applicant_educations do |t|
|
174
174
|
t.integer :applicant_id
|
175
|
+
t.string :applicant_type
|
175
176
|
|
176
177
|
t.date :start_on
|
177
178
|
t.date :end_on
|
@@ -191,6 +192,7 @@ class CreateEffectiveMemberships < ActiveRecord::Migration[6.0]
|
|
191
192
|
# Applicant Experiences
|
192
193
|
create_table :applicant_experiences do |t|
|
193
194
|
t.integer :applicant_id
|
195
|
+
t.string :applicant_type
|
194
196
|
|
195
197
|
t.string :level
|
196
198
|
t.integer :months
|
@@ -216,6 +218,7 @@ class CreateEffectiveMemberships < ActiveRecord::Migration[6.0]
|
|
216
218
|
# Applicant References
|
217
219
|
create_table :applicant_references do |t|
|
218
220
|
t.integer :applicant_id
|
221
|
+
t.string :applicant_type
|
219
222
|
|
220
223
|
t.string :name
|
221
224
|
t.string :email
|
@@ -264,7 +267,9 @@ class CreateEffectiveMemberships < ActiveRecord::Migration[6.0]
|
|
264
267
|
create_table :applicant_courses do |t|
|
265
268
|
t.integer :applicant_course_area_id
|
266
269
|
t.integer :applicant_course_name_id
|
270
|
+
|
267
271
|
t.integer :applicant_id
|
272
|
+
t.string :applicant_type
|
268
273
|
|
269
274
|
t.string :title
|
270
275
|
t.integer :amount
|
@@ -279,7 +284,9 @@ class CreateEffectiveMemberships < ActiveRecord::Migration[6.0]
|
|
279
284
|
# Applicant Reviews
|
280
285
|
create_table :applicant_reviews do |t|
|
281
286
|
t.string :token
|
287
|
+
|
282
288
|
t.integer :applicant_id
|
289
|
+
t.string :applicant_type
|
283
290
|
|
284
291
|
t.integer :reviewer_id
|
285
292
|
t.string :reviewer_type
|