rails
rails copied to clipboard
Ruby on Rails
When a client follows an HTTP 302 redirect, it will typically use the same HTTP method as the original request. This can cause issues when, for example, redirecting an XHR...
### Summary Documentation clarification regarding the `index_with` method. Product of the discussion over at #45286
### Summary The existing `ContentAttachment` model is a fossil from when Action Text was first extracted from Basecamp. It is unused, and effectively broken (since the partials it references were...
### Summary The [Action Mailer guide](https://edgeguides.rubyonrails.org/action_mailer_basics.html#action-mailer-configuration-for-gmail) recommends using [opportunistic TLS](https://en.wikipedia.org/wiki/Opportunistic_TLS) (`enable_starttls_auto: true`) for connecting to smtp.google.com. This setting is vulnerable to man-in-the-middle attacks. Google definitely supports STARTTLS, so this should...
I'm trying to copy one column from one table to another. It does not work with Postgresql. I'm not sure if this is a bug or if this works by...
Add ability to use hash with columns and aliases inside #select method. ```ruby Post .joins(:comments) .select( posts: { id: :post_id, title: :post_title }, comments: { id: :comment_id, body: :comment_body} )...
If a subscription for the same identifier already exists then it has already been or is being subscribed via the connection, so no need to re-subscribe. Without this change, a...
The ArgumentError message being raised when some enums conflicts occur is sometimes misleading. ### Steps to reproduce Add the following to any model: ```ruby enum foo: { active: 0, inactive:...
There is an edge case with ActiveRecord's `where.associated` and `where.missing` clauses when using them with same-table parent/children associations, causing those to generate what I believe is not the expected SQL...
Follow-up to #45487, which was reverted by #45753. This factors `validates_secure_password` out of `has_secure_password`, to provide an API for conditionally requiring a password. For example: ```ruby class Account include ActiveModel::SecurePassword...