| 更新: | 2021-05-23 |
|---|---|
| 作者: | @voluntas |
| バージョン: | 2021.1 |
| URL: | https://voluntas.github.io/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Railsガイド: Rails アプリケーションのエラー通知 | |
| # https://railsguides.jp/error_reporting.html | |
| # 7.0 < ver | |
| begin | |
| do_something | |
| rescue SomethingIsBroken => error | |
| MyErrorReportingService.notify(error) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # FacadeパターンはControllerとViewからプレゼンテーションロジックを抽出したPlain Ruby Objectのインターフェイス | |
| # 参考↓ | |
| # https://refactoring.guru/ja/design-patterns/facade/ruby/example | |
| # https://blog.appsignal.com/2020/03/18/facade-pattern-in-rails-for-performance-and-maintainability.html | |
| ## Facade未使用 | |
| class BooksController < ApplicationController | |
| def index | |
| @books = if params[:query].present? | |
| current_user.books.where('name ILIKE ?', "%#{params[:query]}%") |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
| Commit type | Emoji |
|---|---|
| Initial commit | 🎉 :tada: |
| Version tag | 🔖 :bookmark: |
| New feature | ✨ :sparkles: |
| Bugfix | 🐛 :bug: |