We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
model_exists?
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
jsonapi-rails/lib/generators/jsonapi/serializable/serializable_generator.rb
Line 18 in 2e1b5b1
That method could be written:
def model_exists? Rails.application.eager_load! ApplicationRecord.descendants.any? { _1.name == class_name } end
Instead of:
def model_exists? Rails.application.eager_load! models = ApplicationRecord.descendants.map(&:name) !!models.find { |model_name| model_name == class_name } end
The text was updated successfully, but these errors were encountered:
No branches or pull requests
jsonapi-rails/lib/generators/jsonapi/serializable/serializable_generator.rb
Line 18 in 2e1b5b1
That method could be written:
Instead of:
The text was updated successfully, but these errors were encountered: