Rails 7.1 Normalizes

  Рет қаралды 3,120

GoRails

GoRails

Күн бұрын

► Check out gorails.com for Pro episodes and more!
► SaaS business template for Ruby on Rails with built-in features like Payments, Teams, and much more: jumpstartrails...
► Ruby on Rails hosting with Hatchbox.io: hatchbox.io
► Learn how to add Stripe Payments (with SCA support!) with Ruby on Rails: courses.gorail...

Пікірлер: 5
@TheDerekCrosson
@TheDerekCrosson Жыл бұрын
This method is so perfect for what I need to do, I'm so glad they are putting it in 7.1. Gonna switch to the master branch in production so I can use this right now
11 ай бұрын
This is amazing, thanks for sharing how to use it
@freibuis
@freibuis Жыл бұрын
can you use normalize with an array of attributes? lets say you had same rules for mobile: phone: fax in one line?
@freibuis
@freibuis Жыл бұрын
boom reads source code ``` def normalizes(*names, with:, apply_to_nil: false) names.each do |name| attribute(name) do |cast_type| NormalizedValueType.new(cast_type: cast_type, normalizer: with, normalize_nil: apply_to_nil) end end self.normalized_attributes += names.map(&:to_sym) end ``` yerp it does ! boom
@atasgudang
@atasgudang Жыл бұрын
Really neat!
Rate Limiting Requests in Rails 7.2
20:09
GoRails
Рет қаралды 2,2 М.
когда не обедаешь в школе // EVA mash
00:57
EVA mash
Рет қаралды 2,2 МЛН
Как подписать? 😂 #shorts
00:10
Денис Кукояка
Рет қаралды 7 МЛН
Omakase Rubocop Linter / Formatter Rules in Rails 7.2
18:51
GoRails
Рет қаралды 1,9 М.
Refactoring Local Variables to Methods In Ruby
4:44
GoRails
Рет қаралды 1,3 М.
Ruby on Rails Job Market 2024 - What's Really Going On?
6:27
Till Carlos
Рет қаралды 1,6 М.
Defer Job Enqueues After Transaction Commit in Rails 7.2
17:14
Limiting & Clamping Values in Ruby
5:26
GoRails
Рет қаралды 1,2 М.
The intro to Docker I wish I had when I started
18:27
typecraft
Рет қаралды 107 М.
Turns out REST APIs weren't the answer (and that's OK!)
10:38
Dylan Beattie
Рет қаралды 159 М.
Why software development has become stressful
19:02
Java Brains
Рет қаралды 13 М.