Posted over 6 years ago by Henning Koch. tutorialzine.com

A very clever hack to parse a structured URL object is to create a element and set its href to...

Posted over 2 years ago by Tobias Kraze.

When upgrading Rails versions -- especially major versions -- you will run into a lot of unique issues, depending on the exact...

Posted over 6 years ago by Arne Hartherz.

Rails migrations allow you to use a change method whose calls are automatically inverted for the down path. However, if...

Posted over 2 years ago by Emanuel De.

We figured out, that ActiveJob Inline might lead to autoloading problems in development. The result was an exception when running...

Posted about 5 years ago by Dominik Schöler.

When building a web application, one is tempted to claim it "done" too early. Make sure you check this list...

Posted over 6 years ago by Thomas Klemm.

# Given the following models class Image < ActiveRecord::Base has_many :album_image has_many :albums, through: :album_images

Posted over 2 years ago by Arne Hartherz. relishapp.com

When you are using lambdas in RSpec to assert certain changes of a call, you know this syntax: expect { playlist.destroy...

Posted over 8 years ago by Henning Koch.

TLDR: In tests you need to clean out the database before each example. Use :transaction where possible. Use :deletion for...

Posted over 9 years ago by Tobias Kraze.

Note: This applies specifically to MySQL. In PostgreSQL for example, this is not an issue. If you care about performance...

Posted over 4 years ago by Dominik Schöler. api.rubyonrails.org

Instantiating ActiveRecord objects comes expensive. To speed up things, you can choose a more direct way to talk to your...

Posted over 6 years ago by Thomas Klemm. docs.angularjs.org

In addition to the {{ myValue }} two-way binding syntax, since Angular 1.3 there's a one-time binding syntax, prefixing...

Posted over 7 years ago by Martin Straub.

Put the attached file to config/initalizers to ignore some fields for rejecting nested records (e.g. hidden input fields).

Posted almost 3 years ago by Tobias Kraze.

Font Awesome 5 is a comprehensive solution for vector icons on your website. Originally, Font Awesome came as an icon...

Posted almost 3 years ago by Emanuel De.

S3cmd is a free command line tool and client for uploading, retrieving and managing data in Amazon S3. S3cmd reads...

Posted over 7 years ago by Dominik Schöler.

Just found out about a great feature in Rails that seems to be around since Rails 2. Start a console...

Posted almost 3 years ago by Emanuel De.

In this example we assume that not only the storage gem changes but also the file structure on disc.

Posted over 4 years ago by Emanuel De.

TL;DR Debugging problems with javascript errors in cucumber tests is sometimes easier in the browser. Run the test, stop...

Posted over 7 years ago by Henning Koch.

What Rails version Within before_* Within after_* Cancel later callbacks Rails 1-4 return false return false Cancel later callbacks...

This website uses short-lived cookies to improve usability.
Accept or learn more