...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...
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
...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...
...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...
...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
...called by super within the current object #comment: The comment of the method (often includes a short discription) #source: The actual code of the method #source_location: The file path...
...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...
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...
...of waiting for a long timeout. The code expands on work by Tobias Kraze. Include the module Include the following StabilizeHeadlessChrome module in your tests: class StabilizeHeadlessChrome class Reaper
...the Webpacker world: Automatic removal of expired assets Manifest backups # config/deploy.rb # No need to include public/packs here, but add the Webpacker cache dir (see link below) set :linked_dirs, %w...
...Attention: This will replace all existing settings of the template. Make sure to include all default template settings by first checking: curl -XGET 'localhost:9200/_template/instance_foo?pretty" manual Overwrite the template...
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...
The recommended additional setup of the spreewald gem, a useful set of cucumber steps, includes adding a file for defining custom selectors which can be used as prose within steps...
...like our "dev" cards deck, but groomed from a single person (Josh Branchaud). It includes an extensive list of over 900 TILs on many topics that might be interesting for...
...I should see the items "{array}"' ParameterType( name: 'array', # Note: the RegEx no longer includes the ^ and $ delimiter: regexp: /\[([^"\[\]]*)\]/, type: Array, transformer: lambda do |array_string| # Code to transform the...
...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...
...a better understanding, where the textContent and the innerHTML properties are defined. It also includes (just for completeness) the innerText property, which is similar to textContent, but has subtile differences...
...browser time to the time currently mocked with Timecop. To integrate those two, we include and activate timemachine.js in our Rails layout whenever we see that Timecop is mocking the...
- if defined?(Timecop) && Timecop.top_stack_item = javascript_include_tag "timemachine.js" :javascript timemachine.config({ dateString: #{Time.now.to_json}, tick: true }) Warning timemachine.js will mock the time as soon as it is loaded...
Your commit messages should include the ID of the issue your code belongs to. Our preferred syntax prefixes the issue title with its ID in brackets, e.g. [FOO-123] Avatars...
...file by calling File.open(@file_path) {...
...} on the file directly instead. I will also include an example on how to use this for directories instead for files at the end...
...other database objects. Scenario You've got two database dumps: dump_a.pgdump dump_b.pgdump Both dumps include these tables: foobar barfoo foobaz You want to create a dump with: dump_a.foobar dump_b.barfoo
...buffer_size set to determine this limit. The default are two pages. This value includes the header buffers. There are two rules affecting the min and max values of proxy...
...When coming from jQuery, also see the card on JavaScript without jQuery. This card includes a link to You Don't Need jQuery, which summarizes most of the alternatives in...
...with ActiveJob, the job arguments are logged. In case of a password reset, this includes the password reset token, which should not be logged. ActiveJob's logs can be disabled...