Skip to content
This repository was archived by the owner on Dec 28, 2023. It is now read-only.

Commit 8317280

Browse files
committed
648: Ransack and chromeversion fixes
1 parent 986f727 commit 8317280

19 files changed

+111
-7
lines changed

Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,12 @@ RUN apt-get update \
2525
&& chown -R app:app $BUNDLE_PATH
2626

2727
# Install chrome and chromedriver for selenium
28-
ENV CHROME_VERSION 119.0.6045.123
29-
ENV CHROMEDRIVER_VERSION 114.0.5735.90
28+
ENV CHROME_VERSION 114.0.5735.90
3029
RUN wget http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_${CHROME_VERSION}-1_amd64.deb \
3130
&& dpkg -i google-chrome-stable_${CHROME_VERSION}-1_amd64.deb || true \
3231
&& apt-get -f install -y \
3332
&& rm -v google-chrome-stable_${CHROME_VERSION}-1_amd64.deb \
34-
&& wget https://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip \
33+
&& wget https://chromedriver.storage.googleapis.com/${CHROME_VERSION}/chromedriver_linux64.zip \
3534
&& unzip chromedriver_linux64.zip -d /usr/local/bin \
3635
&& rm chromedriver_linux64.zip
3736

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ gem 'rails', '~> 7.1.1'
1010

1111
gem 'bootsnap', require: false
1212

13-
gem 'activeadmin', '> 2.14.0'
13+
gem 'activeadmin', '> 2.13.1'
1414
gem 'autoprefixer-rails', '~> 10.4.2.0'
1515
gem 'cancancan', '~> 3.3.0'
1616
gem 'carrierwave', '~> 2.2.5'

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ DEPENDENCIES
659659
active_admin_theme
660660
active_model_serializers (~> 0.10.13)
661661
active_skin
662-
activeadmin (> 2.14.0)
662+
activeadmin (> 2.13.1)
663663
autoprefixer-rails (~> 10.4.2.0)
664664
barnes
665665
better_errors

app/models/allocation.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ def user_punches
5959
.decorate
6060
end
6161

62+
def self.ransackable_attributes(auth_object = nil)
63+
%w[
64+
created_at end_at hourly_rate_cents hourly_rate_currency id id_value
65+
ongoing project_id start_at updated_at user_id
66+
]
67+
end
68+
6269
private
6370

6471
def end_before_start?

app/models/city.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@ def to_s
1616
def holidays
1717
regional_holidays.to_formatted_hash
1818
end
19+
20+
def self.ransackable_attributes(auth_object = nil)
21+
%w[created_at id id_value name state_id updated_at]
22+
end
1923
end

app/models/contribution.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,18 @@ def update_rejected_reason(rejected_reason = "other_reason", reviewer_id)
6767
scope :tracking, -> { where(tracking: true) }
6868
scope :without_description, -> { where(description: nil) }
6969

70+
def self.ransackable_attributes(auth_object = nil)
71+
%w[
72+
created_at description id id_value link notes pending pr_state
73+
rejected_reason repository_id reviewed_at reviewer_id state tracking
74+
updated_at user_id
75+
]
76+
end
77+
78+
def self.ransackable_associations(auth_object = nil)
79+
%w[repository reviewed_by users]
80+
end
81+
7082
private
7183

7284
def normalize_description_blank_value

app/models/education_experience.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,10 @@ class EducationExperience < ApplicationRecord
1616
allow_nil: true
1717

1818
scope :for_user, ->(user_id) { where(user_id:) }
19+
20+
def self.ransackable_attributes(auth_object = nil)
21+
%w[
22+
course created_at end_date id id_value institution start_date updated_at user_id
23+
]
24+
end
1925
end

app/models/evaluation.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,17 @@ class Evaluation < ApplicationRecord
2828
}, scope: :shallow,
2929
predicates: true
3030

31+
def self.ransackable_attributes(auth_object = nil)
32+
%w[
33+
created_at english_level evaluated_id evaluation_date evaluator_id
34+
id id_value observation questionnaire_id score updated_at
35+
]
36+
end
37+
38+
def self.ransackable_associations(auth_object = nil)
39+
%w[answers evaluated evaluator questionnaire]
40+
end
41+
3142
private
3243

3344
def update_office_score

app/models/office.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,10 @@ def calculate_score
2222
users_average_score = users_overall_scores.sum / users_overall_scores.size
2323
update(score: users_average_score.round(2))
2424
end
25+
26+
def self.ransackable_attributes(auth_object = nil)
27+
%w[
28+
active city created_at head_id id id_value score updated_at users_count
29+
]
30+
end
2531
end

app/models/project.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,8 @@ def enable!
3131
def to_s
3232
name
3333
end
34+
35+
def self.ransackable_attributes(auth_object = nil)
36+
%w[active created_at id id_value market name updated_at]
37+
end
3438
end

0 commit comments

Comments
 (0)