Rails first_or_create ActiveRecord method

前端 未结 4 452
你的背包
你的背包 2021-02-05 01:53

What does the first_or_create / first_or_create! method do in Rails?

According to the documentation, the method \"has no description\"

4条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-02-05 02:43

    Gets the first record that matches what you have specified or creates one if there are no matches

提交回复
热议问题