Attaching files on save, Rails notes and more

Posted by morgoth85, July 13, 2018 @ 12:00 am in News

Hello Ruby fans. This is Wojtek bringing you latest news from World Cup fields.
I mean Ruby on Rails codebase…

Support readonly option in SQLite3

To ensure no modifications are allowed on SQLite3 database you can now pass “readonly” option.

Support “_html” suffix for array in translations

Now in HTML safe translation key, you can use array of values that will not be escaped in the view.

Change “rails notes” to use Rails command

Previously it was using Rake task under the hood. Now it’s a pure command. Old “rails notes ANNOTATION=custom” becomes “rails notes –annotations custom”. Old syntax will continue to work outputting a deprecation message.

Store newly-uploaded files on save rather than assignment

Active Storage will now store attachables assigned to a record after the record is saved rather than immediately. This will help in supporting validations before persisting the file.

Allow to explicitly specify whether to output Rails’s log to stdout

New option “–log-to-stdout” was added to “rails server” command. Enabled by default in development when not daemonized (as it was before).

25 people contributed to Rails this past 2 weeks when not watching World Cup. You can see all the changes here.

Let’s wish ourselves a great final game on Sunday. Until next week!