We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
rails changelog
Hey there! We've got some exciting updates and improvements to share with you. Check out the latest changes below:
New Features
-
Password Reset Flow 🛠️
- We've rolled out a shiny new password reset feature for the authentication generator. Now users can easily reset their passwords with new views (
new.html.erb
andedit.html.erb
), aPasswordsController
, and aPasswordsMailer
. This also includes streamlined HTML and updated routes to make the process smooth and user-friendly.
- We've rolled out a shiny new password reset feature for the authentication generator. Now users can easily reset their passwords with new views (
-
Running Tests by Line Range 📋
- Added a section in the contribution guide explaining how to run tests by specifying a line range. This is a game-changer for contributors who want to focus on specific parts of the codebase without running the entire test suite.
Improvements
-
Faster Route Mapping Scope Lookups 🚀
- Optimized the performance of route mapping scope lookups by merging inherited values directly into the immediate hash. This reduces unnecessary iterations, especially with deeply nested routes, making lookups faster and more efficient.
-
Enhanced Filename Sanitization 🗂️
- Updated
ActiveStorage::Filename#sanitized
to include new unsafe characters specific to Windows filenames ("
,<
,>
,?
,*
). This ensures better compatibility and fewer errors when handling file uploads.
- Updated
-
Completion of #to_fs Functionality ✔️
- Finalized the
#to_fs
method after removing deprecated features. This makes the method more robust and aligns it with current standards for better code quality and maintainability.
- Finalized the
Bug Fixes
-
Ruby 3.4.0dev Warning 🐛
- Resolved a warning related to the
Pilot.generates_token_for
method in Ruby 3.4.0dev. This fix ensures that blocks passed to this method are properly handled, eliminating the warning and improving compatibility with future Ruby versions.
- Resolved a warning related to the
-
PostgreSQLAdapterTest Error 🐘
- Fixed an error in
PostgreSQLAdapterTest#test_disable_extension_without_schema
caused by aPG::DuplicateObject
error. The fix also applies to thetest_disable_extension_with_schema
test to prevent similar issues.
- Fixed an error in
-
Removed Duplicate Line 🔄
- Cleaned up the code by removing a duplicated line that has been around since a previous commit. This helps maintain a tidy and efficient codebase.
Chores
- Deleted CHANGELOG Entry 🗑️
- Removed a specific entry from the CHANGELOG regarding the
bin/rails boot
command. This change has been cherry-picked to the 7-2-stable branch for consistency.
- Removed a specific entry from the CHANGELOG regarding the
That's all for now! Keep an eye out for more updates and happy coding! 🌟
Included Commits
This commit introduces a password reset feature to the Rails authentication generator, enhancing the existing authentication system by allowing users to reset their passwords. The changes include the addition of two new views for password reset functionality: new.html.erb
for requesting a password reset and edit.html.erb
for updating the password. A new PasswordsController
is implemented to handle the logic for creating and updating passwords, along with a PasswordsMailer
to send reset instructions via email. The generator now also includes the necessary routes and updates to existing files to accommodate this new feature.
In addition to the new functionality, the commit also simplifies the HTML structure of the views and fixes various issues related to routing and token handling. The overall goal of these changes is to streamline the password reset process while maintaining clarity and usability within the authentication system. The commit concludes by updating the usage documentation to reflect the inclusion of the password reset feature.
Files changed
- railties/lib/rails/generators/erb/authentication/authentication_generator.rb
- railties/lib/rails/generators/erb/authentication/templates/views/passwords/edit.html.erb
- railties/lib/rails/generators/erb/authentication/templates/views/passwords/new.html.erb
- railties/lib/rails/generators/erb/authentication/templates/views/sessions/new.html.erb
- railties/lib/rails/generators/rails/authentication/USAGE
- railties/lib/rails/generators/rails/authentication/authentication_generator.rb
- railties/lib/rails/generators/rails/authentication/templates/controllers/passwords_controller.rb
- railties/lib/rails/generators/rails/authentication/templates/mailers/passwords_mailer.rb
- railties/lib/rails/generators/rails/authentication/templates/models/user.rb
- railties/lib/rails/generators/rails/authentication/templates/test/mailers/previews/passwords_mailer_preview.rb
- railties/lib/rails/generators/rails/authentication/templates/views/passwords_mailer/reset.html.erb
- railties/lib/rails/generators/rails/authentication/templates/views/passwords_mailer/reset.text.erb
This commit expands the functionality of the authentication generator to include support for password resets in addition to the existing database-tracked sessions. The CHANGELOG.md has been updated to reflect this enhancement, highlighting the changes made to various files within the application, such as the addition of a new PasswordsController
and PasswordsMailer
, as well as corresponding views for creating and editing password reset requests.
The update also includes new templates for email notifications related to password resets, ensuring that users receive appropriate communication during the reset process. Overall, this commit enhances the authentication system by providing a more comprehensive user experience with added password management capabilities.
Files changed
- railties/CHANGELOG.md
This commit involves the deletion of a specific entry from the CHANGELOG regarding the bin/rails boot
command in the railties component. The entry detailed that the command boots the application and supports standard environment options, but it has now been removed, reflecting a decision to streamline the documentation or possibly indicate that the feature is no longer relevant or available.
The modifications resulted in the removal of five lines from the CHANGELOG, with no new additions. The commit has been cherry-picked to the 7-2-stable branch, ensuring that this change is also reflected in the stable version of the project. The focus of the remaining CHANGELOG content shifts to other updates, such as generating form helpers to utilize textarea*
methods instead of text_area*
methods.
Files changed
- railties/CHANGELOG.md
This commit enhances the ActiveStorage::Filename#sanitized method by incorporating additional unsafe characters that are not permitted in Windows filenames. Specifically, the characters added to the sanitization process include double quotes ("
), less than (<
), greater than (>
), question mark (?
), and asterisk (*
).
By updating the sanitization logic to account for these characters, the commit aims to improve the robustness of filename handling within the ActiveStorage framework, ensuring that filenames are compliant with Windows file system restrictions and preventing potential errors or issues when storing files.
Files changed
This commit introduces a new section in the contribution guide that explains how to run tests by specifying a line range. This addition aims to enhance the efficiency of testing by allowing contributors to focus on specific parts of the codebase, making it easier to validate changes without executing the entire test suite. The section provides clear instructions and examples to help users understand how to implement this functionality effectively.
By including this information, the commit enhances the overall usability of the contribution guide, empowering contributors to streamline their testing processes and potentially improve the quality of contributions made to the project. The change is marked with a "[skip ci]" directive, indicating that continuous integration processes should not be triggered for this commit.
Files changed
This commit resolves a warning encountered in Ruby version 3.4.0dev related to the Pilot.generates_token_for
method, which was identified during CI testing. The warning indicated that a block passed to this method might be ignored, leading to a failure in the tests for the secure_password
functionality within the ActiveModel module of Rails. The specific warning was triggered while running tests in secure_password_test.rb
, highlighting a potential issue with the way the block was defined and utilized.
To address this, the commit modifies the relevant code in the active_model/secure_password.rb
file to ensure that the block is properly handled, thereby eliminating the warning. This change not only resolves the CI failure but also enhances compatibility with the upcoming Ruby version, ensuring that the Rails framework remains robust and functional in future environments.
Files changed
The recent commit addresses the completion of the #to_fs
functionality, which was previously marked as a "todo" due to its reliance on deprecated features. With the removal of the deprecated elements, the implementation can now be finalized. This update enhances the robustness and reliability of the #to_fs
method, ensuring it operates effectively without legacy dependencies.
Additionally, the commit likely includes adjustments or improvements to the code to align with current standards and practices, thereby improving overall code quality and maintainability. This update marks a significant step in the project's evolution, enabling further development and enhancements in related areas.
Files changed
The commit focuses on optimizing the performance of route mapping scope lookups by enhancing the way inherited values are managed. Instead of relying on an array of hashes for scopes, the implementation merges inherited values directly into the immediate hash. This adjustment significantly reduces unnecessary iterations that occur with deeply nested routes, leading to faster lookups.
Overall, the changes aim to streamline the process of route mapping, improving efficiency and potentially enhancing the application's responsiveness when dealing with complex routing structures.
Files changed
This commit resolves an error encountered in the PostgreSQLAdapterTest#test_disable_extension_without_schema
, which was causing a Continuous Integration (CI) failure due to a PG::DuplicateObject
error indicating that the "hstore" extension already exists. The error was triggered during the execution of the test, highlighting issues with the handling of database extensions in the context of ActiveRecord's PostgreSQL adapter.
In addition to fixing the specific test that was failing, the commit also addresses a related test, test_disable_extension_with_schema
, to prevent similar issues from arising in the future. This proactive approach ensures the robustness of the test suite and maintains the integrity of the database interactions within the ActiveRecord framework. The changes made in this commit are part of a broader effort to enhance the reliability of the PostgreSQL adapter tests, as indicated by the follow-up references to previous issues.
Files changed
This commit addresses the removal of a duplicated line of code that was identified in the project. The redundancy was noted to have existed since the commit identified by the hash 2d0bb9344fc4cb93000921d4c4f71c25b276ad79, indicating that the issue has persisted for some time without correction.
By eliminating the duplicate line, the commit aims to streamline the codebase, improve readability, and potentially enhance performance by reducing unnecessary repetitions. Overall, this change contributes to better code maintenance and clarity.