app/admin/activities.rb
Complex method member_action#publish (26.1) Open
Open
member_action :publish, method: :put do
if resource.results.empty?
flash[:error] = t '.empty_protocol'
elsif resource.correct?
resource.update!(published: true)
- 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