RubyCademy(@RubyCademy) 's Twitter Profileg
RubyCademy

@RubyCademy

Follow us to Learn Ruby and Rails the Fun Way!

ID:1047792827386810368

linkhttps://www.rubycademy.com calendar_today04-10-2018 10:17:31

296 Tweets

2,3K Followers

1 Following

RubyCademy(@RubyCademy) 's Twitter Profile Photo

✨ $> rails console ✨

Make your instance variables, methods, and aliases instantly accessible in the Rails Console 🤩

✨ $> rails console ✨ Make your instance variables, methods, and aliases instantly accessible in the Rails Console 🤩 #rubyonrails
account_circle
RubyCademy(@RubyCademy) 's Twitter Profile Photo

✨ RAILS PRO TIPS ✨

Use values_at to fetch specific elements from an array in a clear, concise way ✨💫

onrails

✨ RAILS PRO TIPS ✨ Use values_at to fetch specific elements from an array in a clear, concise way ✨💫 #ruby #rubyonrails
account_circle
RubyCademy(@RubyCademy) 's Twitter Profile Photo

Great question! 💚

It'd work if the manager variable was nil.

But here we want to check if the manager's email is non-blank (an empty string, nil, etc...)

account_circle
RubyCademy(@RubyCademy) 's Twitter Profile Photo

✨ RAILS PRO TIPS ✨

Take advantage of

➡️Object#presence
➡️ and the McCarthy evaluation

to elegantly select the first non-blank value✨💫

✨ RAILS PRO TIPS ✨ Take advantage of ➡️Object#presence ➡️ and the McCarthy evaluation to elegantly select the first non-blank value✨💫 #rubyonrails #IdiomaticRuby
account_circle
RubyCademy(@RubyCademy) 's Twitter Profile Photo

✨ IRB PRO TIPS ✨

Take advantage of the edit command to modify your file directly within your current rails console session ✨💫

✨ IRB PRO TIPS ✨ Take advantage of the edit command to modify your file directly within your current rails console session ✨💫 #rubyonrails #railsconsole
account_circle
RubyCademy(@RubyCademy) 's Twitter Profile Photo

✨ RAILS PRO TIPS ✨

Use the variants: keyword argument to effortlessly select the correct view based on your current_user's role. 🚀

For more PRO TIPS: 🔗 rubycademy.com

✨ RAILS PRO TIPS ✨ Use the variants: keyword argument to effortlessly select the correct view based on your current_user's role. 🚀 For more PRO TIPS: 🔗 rubycademy.com #rubyonrails
account_circle
RubyCademy(@RubyCademy) 's Twitter Profile Photo

✨ RAILS PRO TIPS ✨

What do Rails consider as unused routes?

PS: Feel free to like and repost to show me that you like this format. That'll let me know if I should invest more time in short videos!

account_circle
RubyCademy(@RubyCademy) 's Twitter Profile Photo

✨ RAILS PRO TIPS ✨

Take advantage of the dependent: destroy_async option to delete the associated collection in a background job 🤯 🤩

💡 Make sure that foreign_key: false is set in your migration

➡️ A detailed course on this topic will be added this week exclusively on…

✨ RAILS PRO TIPS ✨ Take advantage of the dependent: destroy_async option to delete the associated collection in a background job 🤯 🤩 💡 Make sure that foreign_key: false is set in your migration ➡️ A detailed course on this topic will be added this week exclusively on…
account_circle
RubyCademy(@RubyCademy) 's Twitter Profile Photo

✨ RUBY TIPS ✨

Use the '-' modifier in strftime to remove any leading whitespace when dealing with single-digit days ✨💫

onrails

✨ RUBY TIPS ✨ Use the '-' modifier in strftime to remove any leading whitespace when dealing with single-digit days ✨💫 #ruby #rubyonrails
account_circle