...their solution a little further to prevent the leak at its root. When you include the attached module in your ApplicationController, you can just use #prepend_view_path as before...
...versions (maybe more): Rails 4.0 - 7.0 This issue is now fixed and the fix included in Rails...
PostgreSQL, unlike MySQL, treats strings as case sensitive in all circumstances. This includes comparison with = and LIKE collision detection in unique indexes Usually this is fine, but some strings (like...
...hook will run after all scenarios have been executed. AfterAll do ... end You can include code to Cucumber in the World module without polluting the application namespace (example from...
...methods can open up code to SQL Injection exploits. The examples here do not include SQL injection from known CVEs and are not vulnerabilites themselves, only potential misuses of the...
...is only allowed to transfer files from a whitelist of paths that should not include /tmp. One solution for this is to save the tempfile in your project directory's...
...a few minor changes. If you have the vcr and webmock gems installed, simply include: # spec/support/vcr.rb VCR.configure do |c| c.cassette_library_dir = Rails.root.join("spec", "vcr") c.hook_into :webmock end RSpec.configure...
This card shows an uncommon way to retrieve a file using selenium where JavaScript is used to return a binary...
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...
...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
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...
...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...