View
Posted about 9 years ago by Henning Koch.

Ruby comes with a class BigDecimal which you can use for arbitrary precision arithmetic. You should use BigDecimal instead of...

Posted 16 days ago by Michael Leimstädtner. github.com

We released a new version of cucumber_factory, which stabilizes the use of transient record references within your steps.

Posted over 4 years ago by Dominik Schöler. github.com

Since images are magnitudes larger in file size than text (HTML, CSS, Javascript) is, loading the images of a large...

Posted 26 days ago by Henning Koch.

To make CSS rules dependent on the screen size, we use media queries: @media (max-width: 500px) { // rules for screen...

Posted almost 9 years ago by Henning Koch.

When your Cucumber feature needs to browse the page HTML, and you are not sure how to express your query...

Posted over 5 years ago by Thomas Klemm.

Creating records in specs can be so fast that two records created instantly after one another might have the same...

Posted about 5 years ago by Arne Hartherz.

Several Rails migration methods accept index: true as an option to create an index. In some cases (like #add_column...

Posted almost 3 years ago by Emanuel De. docs.ruby-lang.org

Use return to return from a method. return accepts a value that will be the return value of the...

Posted about 1 month ago by Emanuel De. millarian.com

In Active Record you can use named bindings in where-conditions. This helps you to make your code more readable...

Posted about 1 month ago by Emanuel De.

With puma you can have concurrent requests. There are two concepts on how Puma can handle two incoming requests: Workers...

Posted over 2 years ago by Henning Koch.

Slides for Henning's talk on Sep 21st 2017. Understanding sync vs. async control flow Talking to synchronous (or "blocking...

Posted about 3 years ago by Judith Roth. github.com

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

Posted about 1 month ago by Emanuel De.

Chrome allows you to throttle the Network and the CPU. Both settings are useful to measure the performance of you...

Posted about 1 month ago by Michael Leimstädtner.

Embedding videos on a website is very easy, add a tag to your source code and it just works...

Posted 2 months ago by Dominik Schöler.

Code comments allow for adding human readable text right next to the code: notes for other developers, and for your...

Posted almost 9 years ago by Henning Koch.

Here are some popular mistakes when using nested forms: You are using fields_for instead of form.fields_for.

Posted over 2 years ago by Dominik Schöler.

TL;DR Use the #remove_ ! method to delete attachments. Also, save the record after removing the file!

Posted over 6 years ago by Henning Koch.

Say you have a User with a Carrierwave attribute #avatar: class User < ActiveRecord::Base mount_uploader :avatar, AvatarUploader end

This website uses cookies to improve usability and analyze traffic.
Accept or learn more