...that Virtus can coerce (auto-cast) structured values like collections or maps: class Klass include Virtus.model attribute :dimensions, Hash[Symbol => Float] attribute :numbers, Array[Integer] end Check out the Virtus...

...taggable-on and want to preload associated tags, you can do so with TaggedModel.scoped(:include => :tag) Note however that this will only prevent tagged_model.tags from hitting the database. Using tagged_model.tag...

makandra dev
github.com

...how an object (image or video) should fit inside its box. object-fit options include "contain" (fit according to aspect ratio), "fill" (stretches object to fill) and "cover" (overflows box...

blog.mailgun.com

...open-sourced a collection of common templates for transactional email. Alternative transactional email templates include these ones... and these also...

Then /^"(.*?)" should be shown in the document title$/ do |expectation| title = page.driver.browser.title title.should include(expectation)

a = Date.parse "11.04.2014" b = Date.parse "31.12.2014" (a..b).count {|date| (1..5).include?(date.wday...

makandra dev
magnus-g.github.io

...tint in any color you want. It also has switches to invert the pattern. @include texture(green, 34, 0); // color, texture-number, 0=inverted or 1=normal

To test whether a hash includes an expected sub-hash: expect(user.attributes).to match(hash_including('name' => 'Bruce Wayne')) expect(User).to receive(:create!).with(hash_including('name' => 'Bruce Wayne...

When you include a non-existing Javascript file, you probably won't notice it during development. But with caching active (on production or staging) Rails will write an empty all.js...

Spreewald includes a few useful steps for debugging a Capybara session. Then show me the page # => Opens the page in the browser Then debugger # => Open a debugging session

...is a kind of features in web applications that hinder automated integration tests. Examples include cookie consent banners or form captchas. Clearly, these should be disabled so you do not...

dead-code.org

...2D ones and modern 2.5D games (3D characters on 2D backgrounds). The kit includes the runtime interpreter (Wintermute Engine, or WME) and GUI editors for managing and creating the...

stackoverflow.com

...use ActiveRecord's columns_hash method. It returns a hash of column objects that include a type attribute (and more database-related information). Example: Contract.columns_hash['id'].type => :integer Contract.columns...

makandra dev
jakiestfu.github.com

...to plain text areas, making it much more enjoyable to write code in. Features include: Custom Code/Behavior Fencing Hard and Soft Tabs Auto Open/Close Parenthesis, Brackets, Braces, Double and Single...

blog.hashrocket.com

...production environment have real live email addresses that receive real live emails. The post includes monkey patch for ActionMailer that rewrites the domain of all recipients. It's a different...

dev.mysql.com

The next version of MySQL will include a built-in memcached daemon. This daemon can quickly get and set key/value pairs from and to InnoDB tables while completely bypassing the...

Did you use the :select option in a find, and forgot to include foo...

makandra dev
fontawesome.com

...fix". It allows you to keep v4 icon names on v5. The linked page includes details on using that, and a migration guide including a list of icon renames...

jakearchibald.com

...horrible. You might end up with worse performance than without pushing. However, the article includes a great explanation of how HTTP/2 push are supposed to integrate with browser APIs...

jakearchibald.com

Showing various caching patterns. Includes WhatsApp screenshots...

nandovieira.com

...JSON data and choose the one that matches your use case best. Rails 4.2 includes support for jsonb columns, too. The article outlines different ways on how to interact with...

blog.mariadb.org

MariaDB 10 includes numerous innovations developed with and for web-scale players like Google, Fusion-IO and Taobao such as Replication, NoSQL Capabilities, Sharding...

fortawesome.github.com

...with CSS animations, smaller file size, possibility to sub-set the font to only include the icons you need...

rubyinside.com

While 2.0 will include a number of syntax changes, new features and general improvements, mentioned below, it is anticipated to remain backward compatible with code written for 1.9.3 and Matz...