github.com

Use Traim to build a RESTful API for your ActiveRecord models with very little code. Traim assumes your API resources...

Sometimes you add Paperclip image styles, sometimes you remove some. In order to only keep the files you actually need...

You can not use the hash_including argument matcher with a nested hash: describe 'user' do let(:user) { {id: 1...

ActiveRecord::RecordNotFound errors provide quite meaningful error messages that can provide some insight on application details. Consider the following:

select2 is a great jQuery library to make (large) fields more usable. For Bootstrap 3 there is select2-bootstrap-theme...

I needed to make sure that an element is visible and not overshadowed by an element that has a higher...

This card will show you a cool way to define a class using Struct.new. A common usecase for Structs are...

When using GROUP BY, MySQL now complains if the SELECT includes columns which are not part of the GROUP BY...

Since Rails 5, domain models inherit from ApplicationRecord by default. This is the place to put code that should be...

Rails supports time zones, but there are several pitfalls. Most importantly because Time.now and Time.current are completely different things and...

Webmocks hash_including is similar to RSpec::Mocks::ArgumentMatchers#hash_including. Be aware that hash_including (webmock v3.0.1) doesn't...

Typhoeus has a different way of representing array params in a get request than RestClient. Typhoeus: http://example.com/?foo[0]=1&foo[1]=2&foo[2]=3

Dump this method into your Ruby console to quickly print data in columns. This is helpful for e.g. comparing attributes...

Database connections are not thread-safe. That's why ActiveRecord uses a separate database connection for each thread.

This card compares patterns to store trees in a relation database like MySQL or PostgreSQL. Implementation examples are for the...

github.com

The parallel-gem is quite easy to use and can speed up rendering time if you want to render the...

When you load a dump for development, records may reference images that are not available on your machine.

Note: The behaviour of Spreewald's within step is as described below for version < 1.9.0; For Spreewald >= 1.9.0 it is...

makandra dev

This is a visualization of the files that will be generated by some useful rails generators. Invoke a generator from...

Crontabs are often unordered, especially when generated for an application where you usually group tasks by their domain/scope.

There seems to be a nasty bug in Chrome 56 when testing with Selenium and Capybara: Slashes are not written...

evilmartians.com

Adding a gem means you take over the liability towards the external code. Checklist Based on "To gem, or not...

If you have a replication error with MySQL and you know the "error" is okay (e.g. you've executed the...