To use a form model with devise, you can simply override #resource_class in a controller. A typical use case...
Fontawesome 4 ships with many useful CSS helper classes. Enlarge Icon Add fa-lg (133%), fa-2x, fa-3x, fa...
Starting from Rails 4.0, you can use a special form options helper called #collection_check_boxes. It behaves similar to...
When using threads, you must make your code thread-safe. This can be done by either locking (mutexes) all data...
Awesome hack by Tim VanFosson:
Web applications can be used by multiple users at the same time. A typical application server like Passenger has multiple...
RSpec 3 has verifying doubles. This breed of mock objects check that any methods being stubbed are present on an...
What if a complicated component comes along that is naturally modeled by multiple directives? This group of directives, as a...
Check your GPU state on chrome://gpu. If it reads "WebGL: Hardware accelerated" in the first list, you're set...
See this Railscast. Basically you can simply write views like index.xlsx.erb: ID Name Release Date Price <% @products.each do |product| %> <%= product.id...
Be careful when using buttons without a type attribute, since browsers will consider them the default submit button of a...
jQuery doesn't store information about event listeners and data values with the element itself. This information is instead stored...
When you are using the #selector_for helper in Cucumber steps, as e.g. Spreewald does, the following snippet will save...
It's like a GUI for the famous git add [-p]. Select files with the up/down-keys and hit
tldr; Use git diff -M or git diff --find-renames when you've moved a few files around. Usage
If your angular app is not served on /, but on a different url (say /admin), links generated with ui-router...
If you're getting this strange error message when setting debugging breakpoints, probably HAML is the culprit. Cause
Geordi 1.0 features a command line application geordi, that holds most of Geordi's previous commands. New features
Just run git show branch:file. Examples: git show HEAD~:bin/command git show origin/master:../lib/version.rb
Here is a Javascript function reloadUsers() that fetches a HTML snippet from the server using AJAX and replaces the current...
This jasmine plugin helps with testing DOM manipulation in two ways: It gives you DOM-related matchers like toBeVisible() or...
Angular 1.3+ has an alternative getter/setter pattern: You can bind ng-model to an accessor function. This is a function...
Capybara-screenshot can automatically save screenshots and the HTML for failed Capybara tests in Cucumber, RSpec or Minitest. Requires Capybara...
Interesting approach to caching responses directly in the HTTP server, based on the value of an individual cookie.