{"comment":{"url":"https://api.github.com/repos/soutetsu/copy-dropbox/comments/14198418","html_url":"https://github.com/soutetsu/copy-dropbox/commit/696621152b1b5344e679386af58a6b5488b83152#commitcomment-14198418","id":14198418,"user":{"login":"maripiyoko","id":1080848,"avatar_url":"https://avatars.githubusercontent.com/u/1080848?v=3","gravatar_id":"","url":"https://api.github.com/users/maripiyoko","html_url":"https://github.com/maripiyoko","followers_url":"https://api.github.com/users/maripiyoko/followers","following_url":"https://api.github.com/users/maripiyoko/following{/other_user}","gists_url":"https://api.github.com/users/maripiyoko/gists{/gist_id}","starred_url":"https://api.github.com/users/maripiyoko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maripiyoko/subscriptions","organizations_url":"https://api.github.com/users/maripiyoko/orgs","repos_url":"https://api.github.com/users/maripiyoko/repos","events_url":"https://api.github.com/users/maripiyoko/events{/privacy}","received_events_url":"https://api.github.com/users/maripiyoko/received_events","type":"User","site_admin":false},"position":5,"line":19,"path":"app/models/user.rb","commit_id":"696621152b1b5344e679386af58a6b5488b83152","created_at":"2015-11-04T23:15:18Z","updated_at":"2015-11-04T23:15:18Z","body":"scopeまだあまり慣れてない感じで、良さがあんまり分かってないですが・・\r\n\r\n（今返事を書こうとしてて一旦調べなおしてみて↓がちょっと納得感・・必ずメソッドチェーン出来る、は他から使う時の安心感ですね！）\r\nhttp://qiita.com/m_nakamura145/items/39820db683255cdc9ea3\r\n\r\n何度かscopeについてのご指摘を頂いて自分の傾向に気づいたのですが、\r\n私、モデルに自分を起点として条件を絞り込もうとする、インスタンスメソッドを書きがちである・・という傾向があるみたいです。\r\n\r\nコレって、あんまり良くないんですかね・・？\r\nモデルで条件を指定して値を返す場合、基本的にはscopeを使うべき、と思ってる方が良いのかな・・\r\nインスタンスメソッドの方がしっくりくる、ってパターンは少ないんでしょうか・・？"}}