rails
rails copied to clipboard
Ruby on Rails
I will admit this is a bit of a niche use-case, but there is currently (to my knowledge, at least) no _public_ way to determine if a relation is `none?`...
In my current implementation, to add file upload size validations directly with S3 I am using [policies](https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-HTTPPOSTConstructPolicy.html) and setting `content-length-range` in them. This request looks something like ``` policy: eyJleHBpcmF0aW9uIjoiMjAyMi0wNi0yMl.......
When validating the CSRF token getting an exception in API > Can't verify CSRF token authenticity. > ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken): the `session[:_csrf_token]` and `request.x_csrf_token` is different and getting issue. when I...
### Motivation / Background Similar to 753633abdfc72743419ba86ef4981679098365e5 and fa6067d, but for Action Mailbox ### Additional information Ref #42378 Ref #42657 I tried to add a test similar to the one...
Presently, `test:prepare` is only defined in the test_unit railtie rake task as a placeholder to be hooked on to. The `tailwindcss-rails`, `cssbundling-rails` and `jsbundling-rails` all enhance the task to allow...
Prematurely loading frameworks in a Rails application may slow down boot time and could cause conflicts with load order and boot of the application. By adding a `:after` option to...
I'm trying to create a tagged logger (`final_logger`) from another tagged logger (`tagged_logger2`) that is receiving broadcasts from yet another tagged logger (`tagged_logger1`). This situation triggers an odd behaviour: tags...
Problem: Though, the `MessageVerifier` that powers `signed_id` supports both `expires_in` and `expires_at`, `signed_id` only supports `expires_in`. Because of this, generating signed_id that expires at a certain time is somewhat tedious....
### Summary If an existing record with inverse_of children was duplicated, additional child records would be built. These new records could be persisted upon save or update inadvertently. I added...
Background ---------- During integration tests, it is desirable for the application to respond as closely as possible to the way it would in production. This improves confidence that the application...