Rails 6:Can be use before? and after? instead of compare operator.

TL,DR: With Rails 6, can be used two methods: before? and after? instead of two operator “ > “ and “<” when compares Date, DateTime, Time object.

Rails 6で、オペレーターの代わりに「Date」や「DateTime」や「Time」オブジェクトなどを比較すろために使用する新しいメソッド「before?」と「after?」を追加された。

»
Author's profile picture Trần Thanh Tú

RSpecでTimecopをRailsのTime Helperに置き換える

TL,DR: gem Timecopの代わりにRailのTime Helperを使えます。「ActiveSupport::Testing::TimeHelpers」です。

»
Author's profile picture Trần Thanh Tú

Cách tích hợp sb-admin-2 vào dự án Rails

TL,DR: Không nên sử dụng theme sb-admin boostrat bằng cách include các thư viện thông thường mà nên sử dụng bower (etc) để quản lý.

»
Author's profile picture Trần Thanh Tú

Form Object Pattern with gem Virtus

Form Object Pattern được sử dụng lúc nào?

»
Author's profile picture Trần Thanh Tú

Be careful with Send & public_send method

Những thứ tiềm ẩn nguy hiểm tới chương trình của bạn khi dùng sendpublic_send.

»
Author's profile picture Trần Thanh Tú

Distinct Include&Extend Require&Load

Cách tiếp cận dễ hiểu nhất.

»
Author's profile picture Trần Thanh Tú

Active Record Observers là gì

Bonus Features của Active Record.

»
Author's profile picture Trần Thanh Tú