Skip to content

Conversation

@tagliala
Copy link
Contributor

@tagliala tagliala commented Sep 19, 2024

require_relative is preferred over require for files within the same project because it uses paths relative to the current file, making code more portable and less dependent on the load path.

This change updates internal requires to use require_relative for consistency, performance, and improved portability.

Ref:

@codecov
Copy link

codecov bot commented Sep 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.92%. Comparing base (9cabeb6) to head (e20fa1a).
Report is 3 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #939   +/-   ##
=======================================
  Coverage   98.92%   98.92%           
=======================================
  Files          14       14           
  Lines         557      557           
=======================================
  Hits          551      551           
  Misses          6        6           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@deivid-rodriguez deivid-rodriguez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

`require_relative` is preferred over `require` for files within the same
project because it uses paths relative to the current file, making code
more portable and less dependent on the load path.

This change updates internal requires to use `require_relative` for
consistency, performance, and improved portability.

Ref:
- activeadmin/arbre#622
@tagliala tagliala force-pushed the chore/prefer-require-relative branch from ede508a to e20fa1a Compare September 19, 2024 12:14
@tagliala tagliala merged commit 0ea9ae8 into activeadmin:master Sep 19, 2024
@tagliala tagliala deleted the chore/prefer-require-relative branch September 19, 2024 12:21
tagliala added a commit to tagliala/activeadmin that referenced this pull request Sep 19, 2024
`require_relative` is preferred over `require` for files within the same
project because it uses paths relative to the current file, making code
more portable and less dependent on the load path.

This change updates internal requires to use `require_relative` for
consistency, performance, and improved portability.

Ref:
- activeadmin/arbre#622
- activeadmin/inherited_resources#939
tagliala added a commit to tagliala/activeadmin that referenced this pull request Sep 19, 2024
`require_relative` is preferred over `require` for files within the same
project because it uses paths relative to the current file, making code
more portable and less dependent on the load path.

This change updates internal requires to use `require_relative` for
consistency, performance, and improved portability.

Ref:
- activeadmin/arbre#622
- activeadmin/inherited_resources#939
tagliala added a commit to tagliala/activeadmin that referenced this pull request Sep 19, 2024
`require_relative` is preferred over `require` for files within the same
project because it uses paths relative to the current file, making code
more portable and less dependent on the load path.

This change updates internal requires to use `require_relative` for
consistency, performance, and improved portability.

Ref:
- activeadmin/arbre#622
- activeadmin/inherited_resources#939
tagliala added a commit to tagliala/activeadmin that referenced this pull request Sep 20, 2024
`require_relative` is preferred over `require` for files within the same
project because it uses paths relative to the current file, making code
more portable and less dependent on the load path.

This change updates internal requires to use `require_relative` for
consistency, performance, and improved portability.

Ref:
- activeadmin/arbre#622
- activeadmin/inherited_resources#939
tagliala added a commit to activeadmin/activeadmin that referenced this pull request Sep 23, 2024
`require_relative` is preferred over `require` for files within the same
project because it uses paths relative to the current file, making code
more portable and less dependent on the load path.

This change updates internal requires to use `require_relative` for
consistency, performance, and improved portability.

Ref:
- activeadmin/arbre#622
- activeadmin/inherited_resources#939
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants