a ||= 1 # a が偽か未定義ならば1を代入。初期化時のイディオムの一種。
参考ページ
ids = [] if ids.blank?
▼
ids ||= []
More than 5 years have passed since last update.
a ||= 1 # a が偽か未定義ならば1を代入。初期化時のイディオムの一種。
参考ページ
ids = [] if ids.blank?
▼
ids ||= []
Register as a new user and use Qiita more conveniently