Before adding database indexes, eager loading, and caches,
spend a few minutes at the whiteboard with your team to rethink
the high-level requirements for your JSON API.
An in-depth look at HTTP requests and how Ajax works in Rails.
How to use Capybara’s wait_for_ajax
helper.
Make clunky negation queries in ActiveRecord easier to read.
We use RSpec feature and specs heavily,
controller and view specs more judiciously,
FactoryBot for test data,
JavaScript integration specs with Poltergeist or Capybara Webkit,
like test doubles and test spies but not test mocks,
and we stub external requests with Webmock.
How to use ActiveRecord’s NullRelation.
Partials are a great way to break down complex view into more manageable...
You won’t find “polymorphic partials” in Rails’ API documentation. However,...
If you have a look at the default application.js file generated by Rails,...
There is a world where developers need never worry about poorly formatted...