...id: 2, title: "How to rock", state: "draft"> ] Let's say you wanted to include deleted articles. Removing the available scope is one way but you might also add another...

...just does memoization and does it well. The syntax is similiar also: class Foo include Memoizer def bar ... end memoize :bar end If you're using Ruby 2.1+, you can...

...write this even shorter: class Foo include Memoizer memoize def bar ... end end This is because def returns the method name as a symbol in...

makandracards.com

...Here's how to reproduce the issue: Example 1 # bad code (Time.current .. Time.current + 1.hour).include?(Time.current) # Use Range#cover? instead of Range#include? since the former does no typecasting into...

ZSH is an alternative command line shell that includes some features like spelling correction, cd automation, better theme, and plugin support. You can replace Bash with ZSH like following:

...fill in "E-mail" with "foo@bar.com" inside the login frame Note: Spreewald >= 4.1.0 already includes that step

postgresql.org

...important as we want to append "mice" and "pandas" only to those arrays that include "cats" in the first place. name topics Alice {dogs,mice,pandas} Bob {llamas}

stackoverflow.blog

A rough guide how to implement a REST API. The discussion here includes some interesting points as well: Timestamps: ISO8601 format ("2021-02-22T20:34:53.686Z")

end class Foo prepend FooExtensions # the only change to above: prepend instead of include end Foo.new.bar # => 'Hello in my World' As mentioned, monkey patches are usually a threat to...

makandra dev
stackoverflow.com

Modern versions of Capybara include a finder method #ancestor which allows you to find a parental element using CSS or XPath. If you previously did something like this: field.find(:xpath...

Then /^I should get a response with status (\d+)$/ do |status| response.status.should include(status) end Capybara Then /^I should get a response with status (\d+)$/ do |status| page.status_code.should include...

web.archive.org

...commands, and scope to individual machines or machine roles. Unfortunately Capistrano 3 does not include these commands any more. cap shell Basics First of all, spawn a Capistrano shell (we...

...ES5 --allowJs --outFile build.js The output will only transpile ES6 syntax. It will not include any polyfills for missing APIs...

...gem with the newer library gem install --no-rdoc --no-ri nokogiri -- --with-xml2-include=/opt/local/include/libxml2 --with-xml2-lib=/opt/local/lib If you still get the error, try to uninstall all...

github.com

...how the joined column is qualified as groups.name (rather than just name): class ContactFilter include Minidusen::Filter filter :text do |scope, phrases| columns = [:name, :email, 'groups.name'] scope.joins(:group).where_like...

...means there won't be a pretty sign-in form any more which would include a link for sign-up or password reset. Sign-up would be easy to solve...

...s matching strategy globally to :prefer_exact. This will positively affect all you steps (including those of gems like Spreewald) as it prevents the Capybara::Ambiguous error in the edge...

...case when two fields are matching the given name, but one of the matches includes the name only as a substring, Capybara.match = :prefer_exact

makandra dev

...hash or your session data into consideration. The following example demonstrates how you could include params to generate the cache path: class JobsController < ApplicationController caches_action :index, :cache_path => :index_cache_path.to...

awsdocs.s3.amazonaws.com

...c www.example.com.ca-bundle -s www.example.com-2011 -v The output should look like this and includes the server certificate Amazon Resource Name (ARN) and GUID: arn:aws:iam::322191361670:server-certificate...

.../projects/:id => ProjectsController#show GET /projects/:id/report => Projects::ReportsController#show Hacks to solve this include renaming the report route to something like /projects_report, or defining a new collection action ProjectsController...

makandra dev

...icon-sprite) no-repeat 0 offset-to-cross-icon You can also have compass include the height and width of the original image, by using +buttons-sprite("blue-button", true...

github.com

Lightweight Angular JS directive to upload files Includes polyfills for old IEs. Unfortunately, their auto-loading mechanism may not work properly on your Rails application due to the asset pipeline...

...They use FileAPI, so you could just include it manually for old browsers, or when you want to use FileAPI's toolkit anyway...

makandra dev

...Compatible changes Improved documentation; README now includes command options. Improvement #90: geordi console, geordi deploy, geordi rake and geordi shell now work correctly if the project hasn't been bundled...

codepen.io

...see it in action. Note that if you have a vertical scrollbar, 100vw will include the scrollbar width, effectively causing a horizontal scrollbar. To cover clickable areas, it's often...

...do with EWS, with accompanying Viewpoint code. Connecting to an exchange server require 'viewpoint' include Viewpoint::EWS endpoint = 'https://your.exchange.server/ews/Exchange.asmx' user = 'your-user' pass = 'your-password' client = Viewpoint::EWSClient.new...