If you want to move an element inside an array, neither JavaScript/ES6+ nor libraries like LoDash offet that natively.
Yesterday, Rails fixed a security issue (CVE-2014-3514) in Rails 4+. It was possible to use .where...
Nearly all jQuery traversal functions ignore elements that are not HTML tags. To work with other type of nodes (like...
Microsoft Exchange service administrators can enable Exchange Web Services (EWS) which is a rather accessible XML API for interacting with...
require 'net/http' module Cheat extend self # the magic ingredient def host @host ||= 'http://cheat.errtheblog.com/' end def http @http ||= Net...
edge_rider is Power tools for ActiveRecord relations (scopes). Please note that some of the functions edge_rider provides have...
When you have an Angular directive that transcludes content, you might want to do something in case there is no...
Great gem to consume RSS feeds. I was missing some features on Ruby's RSS::Parser that I found in...
You know each_with_index from arrays: ['hello', 'universe'].each_with_index do |value, index| puts "#{index}: #{value}" end
So you have placed a breakpoint somewhere and now want to dig around, but not even inspecting variables is working...
Spreewald 1.1.0 drops the be_true and be_false matchers in order to be RSpec 3 and Ruby 2 compatible...
Code snippet tested with Rails 2.3 def index # ... if request.xhr? html = render_to_string(:partial => "list", :layout => false) respond_to...
The attached post shows some alternative ways to define Strings in Ruby using the percent notation. This can be useful...
This actually works: class Klass def initialize `hi world` end def `(message) puts "Called with backticks: #{message}" end end
The debugger gem does not seem to be properly working on Ruby 2. Use byebug instead! Byebug is a simple...
The attached RSpec matcher allows for comfortably testing delegation. Examples describe Post do it { should delegate(:name).to(:author).with...
Automatically builds gems from Bower packages (currently 1700 gems available). Packaged Javascript files are then automatically available in your asset...
If your requests blow up in Ruby or CURL, the server you're connecting to might only support requests with...
This card describes how to pass an array with multiple element to a JavaScript function, so that the first array...
In whenever you can schedule Ruby code directly like so: every 1.day, :at => '4:30 am' do runner "MyModel.task_to...
So you're getting an error message like the following, although your Gemfile lists shoulda-matchers and it has always...
If you have some file or directory that should trigger a Spring reboot, tell Spring e.g. in config/spring.rb: Spring.watch 'file.rb...
Aruba is an extension to Cucumber that helps integration-testing command line tools. When your tests involve a Rails test...
Provides a value container that guarantees atomic updates to this value in a multi-threaded Ruby program. Originally linked to...