https://ginza-rails.connpass.com/event/152498/ の発表資料です。 Read less
![serviceクラスをやめようサブクラスを使おう](https://cdn-ak-scissors.b.st-hatena.com/image/square/73927a7d105aa6d8f836f939d81819debf8cfce5/height=288;version=1;width=512/https%3A%2F%2Fcdn.slidesharecdn.com%2Fss_thumbnails%2Fdont-use-service-class-use-subclass-191116070111-thumbnail.jpg%3Fwidth%3D640%26height%3D640%26fit%3Dbounds)
https://ginza-rails.connpass.com/event/152498/ の発表資料です。 Read less
has_many :through と HABTM の使い分けの基準が Rails Guides にのっていました。 The simplest rule of thumb is that you should set up a has_many :through relationship if you need to work with the relationship model as an independent entity. If you don’t need to do anything with the relationship model, it may be simpler to set up a has_and_belongs_to_many relationship (though you’ll need to remember to create the joinin
いよいよJリーグも始まり、嬉しく思っているGMOメディア技術推進室の中村です。今年は何処が優勝するのでしょうかね?自分が応援しているチームが優勝すると良いのですが・・・。 今回はRailsで自動テストをする時に使うRSpecを紹介したいと思います。RSpecはBDD(behavior driven development) 用のテストフレームワークです。RailsではデフォルトでTestUnitがありますが、RSpecも結構人気があり使う人が多いです。 以降ではRailsの中でRSpecを使ったテストの準備から実際にモデルクラスに対するテストの実施までの流れを書いて行きたいと思います。 1. 環境設定Gemfile に以下のように追記します。 group :test do gem "rspec" gem "rspec-rails" end 追記したら「bundle install」を実行し
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く