app/presenters/activity_presenter.rb
Complex method ActivityPresenter#noun (61.7) Open
Open
def noun
case subject_type
when 'Project'
"#{subject_type} '#{helpers.link_to subject.name, project_path(subject)}'"
when 'Story'
- 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 ActivityPresenter#predicate (38.4) Open
Open
def predicate
return '' unless action == 'update'
changes = subject_changes.keys.reject { |key| IGNORED_FIELDS.include?(key) }.map do |key|
case key
when 'documents_attributes' then document_changes subject_changes[key]
- 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