fix: name collision of index scope with active record model method

parent 26eb3224
......@@ -14,6 +14,7 @@ variables:
.push-pull-cache:
cache:
key: aoz-003-ruby-2-6-6
paths:
- tmp/cache/ruby
- tmp/cache/yarn
......@@ -21,6 +22,7 @@ variables:
.pull-cache:
cache:
key: aoz-003-ruby-2-6-6
paths:
- tmp/cache/ruby
- tmp/cache/yarn
......
......@@ -28,8 +28,8 @@ fieldset {
flex: 0 0 80%;
font-size: 12px;
line-height: 1.4;
padding: 6px 12px;
outline: none;
padding: 6px 12px;
&:focus {
@extend .form-control:focus;
......@@ -45,16 +45,15 @@ fieldset {
flex: 0 0 20%;
&:hover {
@extend .btn:hover;
@extend .btn-default:hover;
@extend .btn, :hover;
@extend .btn-default, :hover;
}
&:active {
@extend .btn-default:active;
@extend .btn:active;
@extend .btn-default, :active;
@extend .btn, :active;
}
}
}
.field-wrapper-inline {
......
......@@ -12,7 +12,7 @@ class SemesterProcessVolunteersController < ApplicationController
semester = Semester.parse(params[:semester])
@global_filters = {semester: params[:semester]}
@semester_process = SemesterProcess.find_by_semester(semester).last
@q = SemesterProcessVolunteer.index(@semester_process).ransack(params[:q])
@q = SemesterProcessVolunteer.index_scope(@semester_process).ransack(params[:q])
@q.sorts = ['volunteer_contact_last_name asc'] if @q.sorts.empty?
@spvs = @q.result.paginate(page: params[:page])
set_responsibles
......
......@@ -45,7 +45,7 @@ class SemesterProcessVolunteer < ApplicationRecord
.references(:assignments, :group_assignments)
}
scope :index, lambda { |semester = nil|
scope :index_scope, lambda { |semester = nil|
active_missions.without_reminders(semester)
}
......@@ -61,8 +61,6 @@ class SemesterProcessVolunteer < ApplicationRecord
joins(:semester_process).where('semester_processes.semester && daterange(?,?)', semester.begin, semester.end)
}
attr_accessor :hours
def hours
missions.map do |m|
m.hours.within_semester(semester)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment