app/admin/volunteers.rb
Complex method index#download_links (126.6) Open
Open
index download_links: [:csv], title: -> { t '.title', date: l(@activity.date) } do
selectable_column
column :athlete
column(:role) { |v| human_volunteer_role v.role }
column :comment
- Read upRead up
- Exclude checks
Flog calculates the ABC score for methods. The ABC score is based on assignments, branches (method calls), and conditions.
You can read more about ABC metrics or the flog tool
Complex method main#scoped_collection (20.0) Open
Open
def scoped_collection
if current_user.admin?
end_of_association_chain
else
event_ids = current_user.permissions.where(subject_class: 'Volunteer').pluck(:event_id).compact
- Read upRead up
- Exclude checks
Flog calculates the ABC score for methods. The ABC score is based on assignments, branches (method calls), and conditions.
You can read more about ABC metrics or the flog tool