RubyCademy
@RubyCademy
Follow us to Learn Ruby and Rails the Fun Way!
ID:1047792827386810368
https://www.rubycademy.com 04-10-2018 10:17:31
296 Tweets
2,3K Followers
1 Following
✨ RAILS PRO TIPS ✨
Take advantage of the Rails 6 destroy_by method to conditionally destroy multiple records ✨💫
#rubyonrails #activerecord
✨ $> rails console ✨
Make your instance variables, methods, and aliases instantly accessible in the Rails Console 🤩
#rubyonrails
✨ RAILS PRO TIPS ✨
Take advantage of
➡️Object#presence
➡️ and the McCarthy evaluation
to elegantly select the first non-blank value✨💫
#rubyonrails #IdiomaticRuby
✨ IRB PRO TIPS ✨
Take advantage of the edit command to modify your file directly within your current rails console session ✨💫
#rubyonrails #railsconsole
✨ 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
✨ 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!
#rubyonrails
✨ RAILS PRO TIPS ✨
Take advantage of the to_sql method to look at the SQL version of your ActiveRecord query ✨💫
#rubyonrails #activerecord