Why Rails has multiple schema formats When you run migrations, Rails will write your current database schema into db/schema.rb. This...

...examples can get quite long, especially in feature specs. This makes them hard to read & understand. Also, when executing them, it may take seconds to see any progress.

...the code and get an idea how it works (you don't have to read or understand it completely). You can either use GitHub's code browser or clone the...

...your own controller Views using ERB Models Helpers Learn how to do CRUD ("Create", "Read", "Update", "Destroy") How to show a list of existing database records How to build a...

...list of actors. We will call this app "MovieDB" in subsequent cards. Skim the README file of the project if you have not done that already. Your MovieDB should deliver...

...same object in memory, instead of loading another copy of the same record. Please read this great section about bi-directional associations from the Rails API for details.

...tests with PARALLEL_TEST_PROCESSORS=#{physical_cpu_count}.") end rescue CannotReadCPUCount => e warn('Cannot read CPU count: ' + e.message) end private def process_count if (env_value = ENV['TEST_ENV_NUMBER...

...to keep your test databases clean, if you're running multiple databases with full read and write access at the same time. This is especially useful when migrating old/existing databases...

...class MigrationRecord < ActiveRecord::Base self.abstract_class = true connects_to database: { writing: :my_app_migration, reading: :my_app_migration } # You never want to allow write access to the database you are...

...user into the ETag of all actions def show ... end def index ... end end Read more Default controller implementation (with caching...

sitepoint.com

...duration // => 210ms An example is storing a transition duration as CSS custom property to read it from Javascript. By converting the value like this, you can ensure your Javascript will...

...Optimizer squashes it and can shrink SVGs to a fraction of their original size. Read on 5 SVG Gotchas How to scale SVG Visual comparison of different combinations of SVG...

...plain Net::HTTP: OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed Here is how to fix that in your application...

...RestClient.get('https://self-signed.badssl.com/') RestClient::SSLCertificateNotVerified: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed Self-signed certificates are basically fine, they were simply...

makandra dev

...DEBUG_OPEN=chrome. The chrome devtools will open and connect to the debugger automatically. Read the docs about remote debugging for details...

postgresql.org

...how the SELECT statement at the end is rather short and much easier to read. The CTE SELECTs are also quite readable. Imagine how a JOINed statement would look like...

...convoluted control flow inherently concurrent computer spends no time waiting for IO (accepting request, reading from database, pushing HTML over network) time can be spent by switching to next context...

done: callbacks.done }) } }) } }) } refreshUsers({ done: function() { console.log('Users refreshed!') } ); This is hard to read! If any step in the chain has an error, the chain silently stops Callbacks with...

makandra dev

...enables pulling default = current # Match remote branch with same name For more configuration examples, read on. Please only use configuration that you understand. Aliases [alias] amend = commit -v --amend # Amend...

...tier (in Bootstrap e.g. "xs" or "md") without duplicating breakpoints to JavaScript: you can read the current breakpoint tier(s) in JavaScript...

...as new technologies evolve. If you are new to this topic, I strongly recommend reading the MDN guide on audio and video formats. TL;DR: To ensure that the playback...

...FLAC, Opus, Vorbis WEBM CC BY 3.0 / BSD-like VP8, VP9 Opus, Vorbis Further reading: MDN: Media container formats (file types) Video Codec Format Matrix A broader comparison of many...

...counts top-level regexp groups, ignoring nested capture groups (I could not confirm that). Read more Upgrading to Cucumber 3.0.0 on cucumber.io

github.com

When handling nested hashes the RSpec output is often hard to read. Here the gem super_diff could help. Add super_diff to your project Add super_diff to your...

...in headless mode Use capybara lockstep to ensure requests don't bleed between steps Read through the README of the capybara-lockstep gem. What problem does it solve and how...

...was split in many. Fortunately, Git offers a special highlighting mode that directs the reader's attention to relevant code parts: git diff --color-moved=dimmed-zebra

thegnar.com

...specs as you can isolate specific parts of the rendered view and then use readable and powerful matchers to assert what you except to see within that part.

This approach allows your view specs to be styled with enhanced readability by isolating the relevant part of the page within a subject block.

...inside the gem. ActiveScaffold provides a quick and powerful user interfaces for CRUD (create, read, update, delete) operations for Rails applications. It offers additonal features including searching, pagination & layout control...

...the actor form automatically suggest a gender as the user types a name Also read this card for an issue you might encounter. The user should be able to override...