Improved assert_redirected_to, improved error messages and more!

 4 months ago
source link: https://rubyonrails.org/2022/9/23/this-week-in-rails-improved-assert_redirected_to-improved-error-messages-and-more-787f42d0
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Friday, September 23, 2022

Improved assert_redirected_to, improved error messages and more!

Posted by gregmolnar

Hi, this is Greg, bringing you the latest changes in the Rails framework.

Allow specifying the HTTP status code in assert_redirected_to Before this change, assert_redirect_to asserted any 3XX response, but with this change, it is possible to assert a specific response code, like 301.

Allow passing classes to dom_id Allowing dom_id to receive a Ruby class, instead of an instance of a class, makes it behave like dom_class, and besides saving a few keystrokes, it saves memory too, because Ruby doesn’t need to instantiate an entire object with all its callbacks and such.

Improve error messages on bin/setup Changing bin/setup to use system(…, exception: true) gives more information when a command fails, and makes debugging easier.

Allow to pass –force to db:system:change db:system:change always prompts to confirm the overwriting of database.yml, but now there is a –force option to skip the confirmation prompt.

Turbo 7.2.0 was released There is a new release for Turbo, which is also available via turbo-rails 1.3.0. You can read the list of changes on the link above.

We had 24 contributors to Rails this week! If you want to be part of that, checkout the issues list! Until next time! 

Subscribe to get these updates mailed to you.

About Joyk

Aggregate valuable and interesting links.
Joyk means Joy of geeK