RubyCademy Profile
RubyCademy

@RubyCademy

Followers
4K
Following
2K
Media
829
Statuses
1K

.

Joined October 2018
Don't wanna be here? Send us removal request.
@RubyCademy
RubyCademy
2 months
Goodbye, RubyCademy 👋 RubyCademy was a project I built out of passion. I shared everything I learned with the genuine desire to help others, just as many helped me grow as a Ruby developer. Over time, our website grew to more than 12,000 users, most of them on free limited
27
7
215
@RubyCademy
RubyCademy
2 months
Since Rails 7.2, `ActiveRecord::Base#pluck` supports hash values as arguments! 🤩 #rubyonrails #activerecord
0
5
69
@RubyCademy
RubyCademy
2 months
Did you know that `Time#utc` modifies the receiver? 😱 Use `Time#getutc` instead. #rubyonrails
3
8
78
@RubyCademy
RubyCademy
2 months
🚨 Rails 8 Breaking Change `stringify_keys` now stringifies all keys, not just symbols! 😮 This could break things silently if you’re not careful. #rubyonrails #activesupport
2
6
80
@RubyCademy
RubyCademy
2 months
✨Don't Overcomplicate Refactoring ✨ Simple reflexes can boost code readability! ➡️ Store roles and permissions in a hash for lookups ➡️ Use with_indifferent_access for string/symbol keys ➡️ Use Hash#fetch for lookups and error handling #rubyonrails
2
7
56
@RubyCademy
RubyCademy
2 months
Did you know you can implement a complete Configuration pattern with `ActiveSupport::Configurable`? 🤩 We also use the `configure` macro to set default values elegantly. #rubyonrails
2
8
63
@RubyCademy
RubyCademy
2 months
No more slow bundle installs! 🤯 Use the `MAKE` environment variable and the `nproc` command to dramatically speed up your `bundle install`! #rubyonrails
4
5
89
@RubyCademy
RubyCademy
2 months
Did you know you can use an infinite range in `case/when` to express "N or more" elegantly? 🤩 #rubyonrails #ruby
1
10
75
@RubyCademy
RubyCademy
2 months
Don’t bother using `create_table` for join tables. Use `create_join_table` instead! 🙏 #rubyonrails
2
9
99
@RubyCademy
RubyCademy
2 months
Did you know you can define Rails locales using a Ruby file instead of the usual YAML? #rubyonrails
4
3
43
@RubyCademy
RubyCademy
2 months
In Rails 8, you can now access your notes directly in the browser by visiting `GET /rails/info/notes`! Small details like this are why we love @rails! 💚 #rubyonrails
6
20
140
@RubyCademy
RubyCademy
2 months
I love this lesser-known technique for checking if two arrays contain the same elements, regardless of order. 🤩 ⚠️: `to_set` is cool but may slow down huge datasets! 😉 #rubyonrails
4
1
36
@RubyCademy
RubyCademy
3 months
The Builder-to-Proc pattern is among my top 3 favorites! 💚 By defining `to_proc` on `self`, you can pass a class directly to `map`, and Ruby converts it into a builder for each element! 🤩 #rubyonrails
2
16
112
@RubyCademy
RubyCademy
3 months
Join RubyCademy today and dive into practical lessons you’ll actually use in your Ruby and Rails projects. https://t.co/49QZ2r9tJk
0
0
1
@RubyCademy
RubyCademy
3 months
Did you know about `up_only` in ActiveRecord::Migration? It lets you run code only when migrating up. 🤩 A simple but powerful method that deserves more attention. #rubyonrails
3
6
62
@RubyCademy
RubyCademy
3 months
Thought of the day: Code as if there were tariffs on each ActiveRecord query you write.
2
3
34
@RubyCademy
RubyCademy
3 months
Tired of setting UUID as the primary key in every migration? Use this simple config and let Rails handle it for you! 🤩 #rubyonrails #activerecord
2
7
94