0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

開発メモ 使ってないけど使いそうなメソッド等

Last updated at Posted at 2019-11-05

開発メモ
使いそうなメソッド群 都度更新

rails scan

正規表現で取得した内容を配列で返す。
取得した文字列文eachみたいな形でぶん回せるっぽい。何か使えそうなのでめも。
https://ref.xaio.jp/ruby/classes/string/scan

20200214追記

忘れそうな簡単な年齢計算
toYearEnd = Date.new(Date.today().prev_month(3).next_year(1).year, 4, 1)
@lists.where("date_part('year', age(?, users.birthday)) <= 18", toYearEnd)

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?