Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ReflectionClassNameString cop #6704

Merged
merged 1 commit into from Jan 29, 2019
Merged

Added ReflectionClassNameString cop #6704

merged 1 commit into from Jan 29, 2019

Commits on Jan 28, 2019

  1. Added ReflectionClassName cop

    This PR add a cop to check if the value of the option `class_name` of a [ActiveRecord::Reflection](https://apidock.com/rails/ActiveRecord/Reflection/AbstractReflection/class_name) is a string.
    
    _Why this cop:_
    
    I was working in a Rails project where often there was a constant used for `class_name` value. That caused a issue which was to preload unnecessary models use in the definition of a reflection.
    Bhacaz committed Jan 28, 2019
    Copy the full SHA
    5b8de06 View commit details
    Browse the repository at this point in the history