...an SQL query. It simply returns a scope object for further chaining with #where, #order, etc. Scopes will make an SQL query when you use them like an array, e.g...

...an SQL query. It simply returns a scope object for further chaining with #where, #order, etc. It can be confusing that typing a scope into the Rails console will immediately...

...network while it runs (it's OK to talk to the network once in order to record a VCR cassette). It should not record an excessive number of VCR cassettes...

null Array, recursively compared by their elements. Their contents must have the same order. Simple objects, recursively compared by their own properties. Nested structures built from objects, arrays and...

makandra Curriculum

...new method #random_each. The method should iterate through the array elements in random order and call the given block for each iteration. For example, the following should work...

makandra Curriculum

...of PNGs and JPGs in the future High density displays Browse the internet in order to: Understand the distinction between virtual pixels vs. physical pixels. Understand how raster images prepared...

...component uses setInterval() it must also clear that interval when it is removed in order to prevent memory leaks. Tools Every modern project needs some way to define components, by...

...similar note, we don't want tests to behave differently based on their execution order or parallelism. One core mechanism in this regard is a gem called Database Cleaner. It...

makandra Curriculum

...of lessons that you finished. This way you get periodic updates about your progress. Order of lessons Work through the cards in the listed order. When you're finished with...

Best results in other decks

Event listeners are called in the order of their registration: button.addEventListener('click', () => console.log("I run first")) button.addEventListener('click', () => console.log("I run second")) Sometimes you want a listener to always run...

...first (or last), but have no control over the order in which other listeners are registered. There is no clean mechanism in the DOM API for this. This card shows...

config.before(:suite) { puts 'BEFORE :suite' } config.after(:suite) { puts 'AFTER :suite' } end describe 'order of hook execution' do around(:all) do |each| puts 'AROUND BEFORE :all' each.run puts 'AROUND...

Search in all decks