Help us understand the problem. What is going on with this article?

railsメモ

More than 3 years have passed since last update.
hoge.ruby
if hogehoge.present?
  #do_something
end

とするより

hoge.ruby
return unless hogehoge.present?
#do_something

とした方が行数減るしネストしなくてわかりやすい!

k-tetsuhiro
東京→福岡に移住してエンジニアをしてます! YoutubeやインスタでFukuokaBaseでも活動しています〜! Youtube : https://www.youtube.com/channel/UCZ7rtcqhTJCBpy9gTMHp5SQ Instagram : https://www.instagram.com/fukuokabase/
https://www.youtube.com/channel/UCZ7rtcqhTJCBpy9gTMHp5SQ
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away