{"author_name":"study-output","url":"https://study-output.hatenadiary.com/entry/2021/04/24/000356","height":"190","author_url":"https://blog.hatena.ne.jp/study-output/","provider_name":"Hatena Blog","image_url":null,"width":"100%","type":"rich","categories":["RSpec","Rails","Ruby"],"blog_url":"https://study-output.hatenadiary.com/","title":"RSpec\u3067\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306e\u30c6\u30b9\u30c8\u3092\u66f8\u3053\u3046\uff01\u3010rails\u3011","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fstudy-output.hatenadiary.com%2Fentry%2F2021%2F04%2F24%2F000356\" title=\"RSpec\u3067\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306e\u30c6\u30b9\u30c8\u3092\u66f8\u3053\u3046\uff01\u3010rails\u3011 - study-output\u306e\u65e5\u8a18\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","published":"2021-04-24 00:03:56","version":"1.0","provider_url":"https://hatena.blog","blog_title":"study-output\u306e\u65e5\u8a18","description":"\u306f\u3058\u3081\u306b \u5148\u65e5\u3001\u306f\u3058\u3081\u3066RSpec\u3067\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u306e\u30c6\u30b9\u30c8\u3092\u66f8\u3044\u305f\u306e\u3067\u30a2\u30a6\u30c8\u30d7\u30c3\u30c8\u3068\u3057\u3066\u66f8\u304d\u307e\u3059\u3002 \u3054\u53c2\u8003\u306b\u306a\u308c\u3070\u5e78\u3044\u3067\u3059\u3002 user\u30e2\u30c7\u30eb\u3068task\u30e2\u30c7\u30eb user\u30e2\u30c7\u30eb\u3068task\u30e2\u30c7\u30eb\u306f\u3053\u3093\u306a\u611f\u3058\u3067\u3059\u3002 \u203b\u4eca\u56de\u306ftask\u30e2\u30c7\u30eb\u306e\u30d0\u30ea\u30c7\u30fc\u30b7\u30e7\u30f3\u30c6\u30b9\u30c8\u306e\u307f\u66f8\u304d\u307e\u3059\u3002 class User < ApplicationRecord authenticates_with_sorcery! has_many :tasks, dependent: :destroy validates :password, length: { minimum: 3 }, if: -> { new_record? || c\u2026"}