hardpixel/active-content

View on GitHub
lib/active_content/attachable.rb

Summary

Maintainability
A
1 hr
Test Coverage

Method has_attachment has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

      def has_attachment(name, field, options={})
        assoc_opts = { as: :attachable, class_name: ActiveContent.config.attachment_class_name, autosave: true, dependent: :destroy }
        assoc_proc = -> { where field: field }

        multiple = options.delete(:multiple)
Severity: Minor
Found in lib/active_content/attachable.rb - About 1 hr to fix

    There are no issues that match your filters.

    Category
    Status