codeforamerica/ohana-api

View on GitHub
app/helpers/admin/form_helper.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
92%

Admin::FormHelper#weekday_select_field doesn't depend on instance state (maybe move it to another class?)
Open

    def weekday_select_field
Severity: Minor
Found in app/helpers/admin/form_helper.rb by reek

A Utility Function is any instance method that has no dependency on the state of the instance.

Admin::FormHelper#field_contains_errors? doesn't depend on instance state (maybe move it to another class?)
Open

    def field_contains_errors?(model, attribute, field)
Severity: Minor
Found in app/helpers/admin/form_helper.rb by reek

A Utility Function is any instance method that has no dependency on the state of the instance.

Admin::FormHelper#weekday_select_field has the variable name 'i'
Open

      WEEKDAYS.each_with_index.map { |day, i| [day, i + 1] }
Severity: Minor
Found in app/helpers/admin/form_helper.rb by reek

An Uncommunicative Variable Name is a variable name that doesn't communicate its intent well enough.

Poor names make it hard for the reader to build a mental picture of what's going on in the code. They can also be mis-interpreted; and they hurt the flow of reading, because the reader must slow down to interpret the names.

There are no issues that match your filters.

Category
Status