大家好,我是 Wojtek,带来上周 Ruby on Rails 的更新。
在批量插入/更新时,时间戳将被自动设置。此行为可以通过模型类上的 record_timestamps 配置禁用。
当使用以 _html 结尾的翻译键时,它将被标记为 HTML 安全,就像在视图中一样。
可与 PostgreSQL 和 SQLite 数据库一起使用 FILTER 子句。
修复了将嵌套列表转换为纯文本时显示的样式问题。
可通过 protect_from_forgery with: CustomStrategy 使用,内置选项包括:exception, reset_session, null_session。
user.password = 'something'
user.password = nil
# before:
user.password # => 'something'
# now:
user.password # => nil