RubyCademy's profile picture. .

RubyCademy

@RubyCademy

.

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…


Since Rails 7.2, `ActiveRecord::Base#pluck` supports hash values as arguments! 🤩 #rubyonrails #activerecord

RubyCademy's tweet image. Since Rails 7.2, `ActiveRecord::Base#pluck` supports hash values as arguments! 🤩

#rubyonrails #activerecord

Did you know that `Time#utc` modifies the receiver? 😱 Use `Time#getutc` instead. #rubyonrails

RubyCademy's tweet image. Did you know that `Time#utc` modifies the receiver? 😱

Use `Time#getutc` instead.

#rubyonrails

🚨 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

RubyCademy's tweet image. 🚨 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

✨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

RubyCademy's tweet image. ✨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

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

RubyCademy's tweet image. 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

No more slow bundle installs! 🤯 Use the `MAKE` environment variable and the `nproc` command to dramatically speed up your `bundle install`! #rubyonrails

RubyCademy's tweet image. No more slow bundle installs! 🤯

Use the `MAKE` environment variable and the `nproc` command to dramatically speed up your `bundle install`!

#rubyonrails

Did you know you can use an infinite range in `case/when` to express "N or more" elegantly? 🤩 #rubyonrails #ruby

RubyCademy's tweet image. Did you know you can use an infinite range in `case/when` to express "N or more" elegantly? 🤩

#rubyonrails #ruby

Don’t bother using `create_table` for join tables. Use `create_join_table` instead! 🙏 #rubyonrails

RubyCademy's tweet image. Don’t bother using `create_table` for join tables.

Use `create_join_table` instead! 🙏

#rubyonrails

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

RubyCademy's tweet image. 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

Thought of the day: Code as if there were tariffs on each ActiveRecord query you write.


Tired of setting UUID as the primary key in every migration? Use this simple config and let Rails handle it for you! 🤩 #rubyonrails #activerecord

RubyCademy's tweet image. Tired of setting UUID as the primary key in every migration?

Use this simple config and let Rails handle it for you! 🤩

#rubyonrails #activerecord

This account does not follow anyone
Loading...

Something went wrong.


Something went wrong.