This card shows an uncommon way to retrieve a file using selenium where JavaScript is used to return a binary...
...need to parse the given string of Ruby code. You don't need to include methods from the superclass. You may assume that the given code contains exactly one class...
mso-line-height-rule: exactly; line-height: 0; } Make sure to include mso-line-height-rule: exactly. Otherwise, MS Outlook will treat your line-height as a minimum...
Rails 6 includes a WYSIWYG editor, Action Text. It works out of the box quite well, but chances are that you want to add some custom functionality. This card contains...
...you are targeting. Replace 123122 with the desired ID for the lookup. The output includes the fixture key (e.g., "one") and its related metadata...
I recently noticed a new kind of flaky tests on the slow free tier GitHub Action runners: Integration tests were...
There is no single place to look up documentation for our stack. This card includes some hints where you can find API documentation. You probably want to drag a few...
Learn to create test data effectively using factories. Decouple tests by having each test start with an empty database...
...alias of []. Calls messages[ ] and returns an array of error messages for that attribute. include?( ) Returns whether there is an error message for that attribute. set( , ) Sets the error messages...
...trait for validating the extensions and content types in all of your uploaders (by including it on the base uploader) and that it now looks like this: class BaseUploader
...in this trait, these lines should now be removed. class BaseUploader < CarrierWave::Uploader::Base include DoesStrictTypeValidations # ... end Now, in your uploaders... def extension_white_list %w[jpg jpeg gif png...
Find html content Then /^I should see "([^\"]*)" in the HTML$/ do |text| response.body.should include(text) end Then /^I should not see "([^\"]*)" in the HTML$/ do |text| response.body.should_not include...
...the HTML within "([^\"]*)"$/ do |text, selector| have_selector(selector).matches?(response) do |content| content.to_html.should include(text) end end Then /^I should not see "([^\"]*)" in the HTML within "([^\"]*)"$/ do |text, selector...
If you need to make an HTTPS connection to a host which uses an expired certificate, do not disable certificate...
...this is that what belongs_to does is actually this: class Project < ActiveRecord::Base include FeatureMethods def user "foo" end end module Project::FeatureMethods def user # association getter goes here...
...w matches a word character (alphanumeric characters plus underscore) \s matches white space character (includes tabs and line breaks) \t matches tab character Non-Printable Characters \xFF matches hexadecimal character...
...options for filtering. This card provides a short overview. By message Only commits that include a specific string in their commit message git log --grep="tracker id" By file
...yet their concrete internal implementation and API differs in certain aspects. The last chapter includes a framework comparison table on the main APIs learnt throughout the book...
...card Accessibility: Making non-standard elements interactive for more details of this approach. It includes various implementation variants depending on the given technology stack and use case. See also
...not add puppet parameters to nagios config next if ['tag', 'ensure', 'require', 'target', 'mode'].include?(parameter) -%> <%= parameter.ljust(35,' ') %><%= value %> <%- end -%> } <% end %> Conclusion Since there is only one file the overhead...
Ruby includes many standard gems that are bundled into the Ruby installation. Here is an example for the gem strscan that will be displayed as default: gem list strscan
There is no does method anymore We now use traits with the vanilla include method: class Article < ActiveRecord::Base include DoesTrashable end When your trait has parameters, use square...
class Article < ActiveRecord::Base include DoesStripFields[:name, :brand] end Note how you can now follow trait names by CTRL+clicking on them in RubyMine! New naming convention for traits...
...times, you won't see a problem with Browsers like Chrome, simply because they include some well-known intermediate certificates (like those of Comodo). >> RestClient.get('https://incomplete-chain.badssl.com/') RestClient::SSLCertificateNotVerified...
...your certificate store. Note that it is essential to call set_default_paths to include your system's default certificate store which contains root CAs. You may omit this but...
...difference between class methods and instance methods (def self.method vs. def method) Modules and include Input and output Simple regular expressions Resources Tutorials Here are some tutorial to get you...
...use the data. You will encounter many feature requests where clients want an association included in some endpoint, otherwise they need to make N+1 requests. GraphQL will solve this...
...and you will run into them. Checkout the alternatives first. You need to configure includes in the controller and not the serializer itself. As we wanted to have the same...
Redis.current will be removed without replacement in redis-rb 5.0. Version 4.6.0 adds deprecation warnings for Redis.current and Redis.current=: `Redis.current...