Comments (2)
From my understanding, the existing cop is covering only the cases when the association is not a standard/default one, but 80% of our associations are standard ones (unless we use Rails engines, it's more around 60%). In either case, I think having a custom cop that requires the inverse_of
explicit argument for ALL the associations might be preferable.
This answer assumes that the remaining 20% of work needed for the custom cop is not too hard of course, if there is any big blocker, we might want to consider (a).
from rails-templates.
@malparty I found an existing Rubocop rule that can achieve this. However, they seem more lax than our rule in Compass. This invalid example is considered valid according to their rule. It is because in this case, Rails can inferred the inverse_of
.
So what should we do with this:
a) Use the existing Rails/InverseOf rule
b) If we prefer the explicit version, we can write a custom rule. The implementation is 80% finished (should've Google first 😅)
from rails-templates.
Related Issues (20)
- Update the branch-tag-action in the test workflow
- [Draft] Add an opinionated CRUD add-on HOT 2
- Add Jest to test javascript and Stimulus controllers HOT 1
- Add GitHub workflow to run the Jest tests when both the Hotwire and GitHub add-ons are selected HOT 1
- Revise the Flow for Asking Options to Generate the Project
- Fix: Deprecation of the script to install NodeJS & Yarn from nodesource HOT 1
- Fix: Duplicated `Dockerfile` and `.dockerignore` when generating the project with Rails 7.1 HOT 2
- Add the Rubocop cop to enforce YARD documentation for public methods
- Add a Bootstrap layout to the CRUD add-on
- Fix: Postcss not compatible with Node 16
- [CRUD] Add SCSS styling to the layout
- [CRUD] Add the index view templates to the generator
- [CRUD] Add the form view templates to the generator
- Create a Rubocop cop for ordering instructions in class (e.g. Models)
- Compare Sidekiq and GoodJob and define if we should change the standard HOT 2
- Fix: The `./rubocop` folder is not copied to the generated project HOT 2
- Compare Pundit and Action Policy and define if we should change the standard
- Add Devise-Hotwire configuration when both Hotwire and Devise are selected
- Update Dockerfile to use multi-stages to reduce build time and image size
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rails-templates.