web.archive.org

When flagging a spec that will be implemented later as pending, include a failing spec body or RSpec 3 will consider the pending test as failing. The reasoning is: If...

...can list all gems of the current ruby version with gem list, which also includes the gems of you Gemfile. These can be uninstalled with gem uninstall gemname.

...which is where I switched to the patched solution above. Note the gist also includes a patch for REE 2012.02. You need to modify ~/.rbenv/plugins/ruby-build/share/ruby-build/ree-1.8.7-2012.02 instead, of course...

Mobile browser's ignore the autoplay attribute on and elements. Stupid reasons include saving mobile bandwidth on behalf of the user and/or securing app store sales. Audio and video elements...

...error with this model: class Model placeholder = 'variations' has_many placeholder nested_scope :verbose, :include => :variations end Everything, including Model.variations and Model.reflect_on_all_associations.map &:name did work (the latter returned [ :some_association...

You can include files from app/assets or from the public folder with javascript_include_tag. The subtle difference that tells rails how to build the path correctly is a single...

...slash at the beginning of the path: <%= javascript_include_tag('ckeditor/config') %> # for assets/ckeditor/config.js <%= javascript_include_tag('/ckeditor/ckeditor') %> # for public/ckeditor/ckeditor.js This also applies to stylesheet_link_tag. Note that when you...

...the number of search results). When you paginate complex scope (e.g. that has many includes), this query may take several seconds to complete. If you encounter this behavior, a solution...

...count yourself and pass it to the pagination call: scope = User.complex_scope_full_of_includes total_number_of_users = scope.count @users = scope.paginate(:total_entries => total_number_of_users...

...disabled$/ do |label, negate| attributes = field_labeled(label).element.attributes.keys attributes.send(negate ? :should_not : :should, include('disabled'))

A Rake task appears in rake -T if it has a description: desc 'Compile assets' task :compile do ... end

makandra dev

...IP adresses (0.0.0.0 is synonym to 'all interfaces on the machine'). The last column includes the PID, kill -9 28683 should exit the process and clean up the socket...

...like "access denied" with 200 OK when you see that request.env['HTTP_USER_AGENT'].include?('ms-office...

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

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

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

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)

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