...defined your association via class Article belongs_to "category" end and you try Article.scoped(:include => :category) you will get an error message in `preload_one_association': Association named 'category' was...

By default, Twitter Bootstrap's print styles include printing links. /* Bootstrap's way of printing URLs */ @media print { a[href]:after { content: " (" attr(href) ")"; } } If you want to turn that...

Selenium does not speak SSL because it uses WEBrick that doesn't. When you use Selenium for Cucumber scenarios that...

github.com

...Matching faces have at least one of these tags Face.where.any tags: 'happy' # Matching faces include the 'happy' tag Face.where.all tags: 'dunno' # Not documented, try for yourself INET/CDIR data types

...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...

For clarity and traceability, your commit messages should include the ID and title of the Pivotal Tracker story you're working on. For example: [#12345] Add Google Maps to user...

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

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...

...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...

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...