...with regular expressions works differently in every language Ruby: Making your regular expressions more readable with /x Regular Expressions - Cheat Sheet ReDOS: Denial of Service attack vector on inefficient regular...
...parses a .rb file containing a simple Ruby class: # student.rb class Student < Person attr_reader :first_name, :last_name, :disabled attr_accessor :credits def full_name first_name + ' ' + last_name...
...rubocop run fails with a stack like rubocop-1.61.0/lib/rubocop/server/socket_reader.rb:36:in `ensure in read!': undefined method `string' for nil:NilClass (NoMethodError) Cache.stderr_path.write(stderr.string) ^^^^^^^ ... rubocop-1.61.0/lib/rubocop/server/socket_reader.rb:27:in `read...
...Gemfile.lock could never indicate which version of a gem was installed, i.e. the Gemfile read nokogiri (1.12.5) although nokogiri (1.12.5-x86_64-linux) might actually be installed. In addition, there...
...versions of Bundler (at least since 2.3) have two different behaviors: If your Gemfile.lock reads PLATFORMS: ruby, it might either install a compatible platform-specific version, or the plain ruby...
Note This is an older video. FactoryGirl has since been renamed to FactoryBot. Read the FactoryBot Getting Started guide. Despite its name this is an in-depth guide and...
...This looks awesome, but at the risk of adding random strings to your screen. Read don't build randomness into your factories for more background. Tests should never influence each...
...to generate beautiful commit messages according to your stories in Linear: geordi commit Geordi reads from a .geordi.yml file inside your repo and connects to Linear to list started and...
...all new projects. We try to migrate legacy projects to BEM, block-by-block. Read Read the chapter "Taming Stylesheets" from our book Growing Rails Applications in Practice (in our...
...of this and just use a plan transaction do. If you need ActiveRecord::Rollback, read on. The basic problem Not all databases support nested transactions. Therefore, Rails will sometimes silently...
...this card by skimming over the linked resource. Discussion Growing Rails applications in practice Read the following chapters from our book Growing Rails Applications in Practice: On following fashions
...about the sandboxing cycle is quite on point on this topic. After the chuckle, read these resources: Pendulum swings by Mark Seemann The Pendulum Swing of Development and Technology Trends...
...we are using popular authentication libraries like clearance or devise for this task. Learn Read the article Rails Authentication from Scratch You don't need to do write any code...
...make the movies' show view only accessible for authenticated users? How does logout work? Read the documentation of clearance in preparation for the exercise below Exercise: Authentication with Clearance
...remove it from the cluster and add it again. Upstream documentation Make sure to read and understand the detailed instructions for etcd runtime reconfiguration. Re-adding a faulty node
Code quality can be measured in four levels: (Working code) Reliable code (minimum) Readable code (ok for short-lived code) Changeable code (standard level) The code quality of a project...
However, you should not stop here. Any piece of code is usually read may times, so please make it readable: 2. Readable code Your code is here to...
...using unicode escape sequences: escapeHighASCII('{"foo":"xäy"}') // => '{"foo":"x\\u00e4y"}' The program that reads the header can access the original string by parsing the header value as JSON. Any JSON...
...accessibility is to add the aria-required attribute in this case. This allows screen readers to announce fields as required before the form is submitted. Define a SimpleForm component:
Rubymonk training Read the following Rubymonk articles: Ruby Primer: Ascent (archived copy) Metaprogramming Ruby (archived copy) Metaprogramming Ruby: Ascent (archived copy) For each chapter in each article:
...very powerful tool. Most notably, it allows you to represent data in a very readable manner. For example, Rails offers a compact DSL to define new routes. A big drawback...
...make custom transcoding/conversion logic working. Unless you adapt your processor, this will now fail. Read the following paragraph on why and how to fix it. The workfile_path breaking custom...
...probably why CarrierWave 3.x introduces the new behavior, below. Still, FFMPEG will then read the video file, extract the first frame image and save it to the thumbnail.jpg file...
...to consume it. Clients can use client libraries to access your API and can read up on the JSON:API spec to get a basic understanding on how to use...
...for different versions of Rails and the behavior is subtly different. Make sure you read and understand the API before using these...
...if you want it to look like a link. This is good for screen readers, which can differentiate between buttons and links Buttons are in the tab order of a...
...will not want to use these styles and instead apply your own styles) Note Read the card Accessibility: Making non-standard elements interactive for more details of this approach. It...
...objects can have getter and setter functions that are called when a property is read from or written to. For example, if you'd like an object that has a...
...some crazy things to allow easier definition of getters/setters in class definitions. Performance considerations Read and write accesses have the same performance characteristics of regular function calls, so it's...
...feature. If you can't think of one, discuss it with your mentor. Also read through the card How to not repeat yourself in Cucumber scenarios. Cucumber Factory
...a very useful gem to create test data in cucumber: cucumber_factory. Read through the README. Integrate it into your MovieDB and replace your custom model creation steps with Cucumber...
...label] attribute: This way, when a visually impaired user focuses the field, the screen reader will speak the label text ("Search contacts"). Info Without an [aria-label] attribute screen readers...
...object.singleton_class.include(SomeModule)? How does include and extend work together with inheritance? You may also read more about the Ruby Object Model, if all of this is quite confusing to you...
...out how ActiveSupport::Concern works. Understand the documentation for our Modularity gem Forwarding arguments Read and understand the card "Changes to positional and keyword args in Ruby 3.0" Monkey patching...
Read (or re-read) the following chapters from our book Growing Rails Applications in Practice (it’s in our library): New rules for Rails Beautiful controllers Relearning ActiveRecord
A few things before you move on Add a reminder to your calendar: Read 5 repeating cards every morning Add a reminder to your calendar: Repeat the learnings of...
...the last 10 curriculum cards every other monday Read the article "Parting advice from an older Software Engineer". Try to memorize the key takeaways of 1-5 on the list...