app/helpers/application_helper.rb
Complex method ApplicationHelper#collect_links (23.1) Open
Open
def collect_links(item)
links = []
if item.url.present?
links << { url: item.url,
- 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 ApplicationHelper#avatar_for_user (22.5) Open
Open
def avatar_for_user(user, size = 16, class_name = nil)
if user.gravatar_email.present?
gravatar_image_tag(user.gravatar_email, title: user.nickname, alt: user.nickname, class: class_name, gravatar: { default: :identicon, size: size })
elsif user.email.present?
gravatar_image_tag(user.email, title: user.nickname, alt: user.nickname, class: class_name, gravatar: { default: :identicon, size: size })
- 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