makandra dev

TL;DR Block formatting contexts establish an isolating container. float and clear only apply to elements within such a container...

The CSS property z-index is not as global as you might think. Actually, it is scoped to a so...

tldr; Use git diff -M or git diff --find-renames when you've moved a few files around. Usage

If you want to load an SQL dump from an ActiveRecord migration, you might find this to be harder than...

relishapp.com

To only stub a method call if a given argument is used, but use the default implementation for other arguments...

makandra dev
github.com

Geordi 1.0 features a command line application geordi, that holds most of Geordi's previous commands. New features

Add gem 'database_cleaner' to your Gemfile. Then: Cucumber & Rails 3+ # features/support/database_cleaner.rb DatabaseCleaner.clean_with(:deletion) # clean once, now DatabaseCleaner.strategy = :transaction...

When navigating back to a page that was received from a POST request, undesired side effects may happen. Therefore, modern...

stackoverflow.com

Just run git show branch:file. Examples: git show HEAD~:bin/command git show origin/master:../lib/version.rb

ImageMagick takes a string with several options when cropping an image. See the command line options for how to provide...

In the tradition of our PostgreSQL cheat sheet for MySQL lamers, here is a cheat sheet for Jasmine when you...

Here is a Javascript function reloadUsers() that fetches a HTML snippet from the server using AJAX and replaces the current...

When testing code that uses pushState / replaceState, your browser will appear to navigate away from http://localhost:3000/specs (or wherever...

Run bundle update cucumber capybara cucumber-rails to update to the newest versions. Backup your features/support/path.rb to be able to...

Angular 1.3+ has an alternative getter/setter pattern: You can bind ng-model to an accessor function. This is a function...

JavaScript objects can have getter and setter functions that are called when a property is read from or written to...

This is a problem when using Selenium with Firefox. We recommend using ChromeDriver for your Selenium tests. This setup allows...

github.com

Capybara-screenshot can automatically save screenshots and the HTML for failed Capybara tests in Cucumber, RSpec or Minitest. Requires Capybara...

makandra dev
api.rubyonrails.org

Rails includes a way to see what an e-mail will look like. Integration to RSpec All you need to...

developer.mozilla.org

You can do so much more than console.log(...)! See the attached link for a great breakdown of what the developer...

edgeguides.rubyonrails.org

Rails guide that covers PostgreSQL-specific column types and usages for Active Record. You should especially keep in mind the...

capybara_element['attribute_name'] allows accessing an element's attributes in Capybara. A few examples: find('#my_element')['class']

Cucumber will clean up files you've uploaded in your Cucumber features automatically with the attached code. Put the file...