...script like this: # This class will be specced # To simplify this, it should not read input class YourScript # Methods offering functionality end unless Rails.env.test? script = YourScript.new # All interactivity (i.e. reading...

expect { subject.print_summary }.to output(/success/).to_stdout end end Further reading Maintaining custom application tasks in Rails

...which map to one context, e. g. mail components, in order to provide better readability of your tests or to even make clear a tests fail reason due to some...

...user with the mail address user@somedomain.com. For Console Debugging If you might want to read out the result of at least one failing expectation for different expected values without interrupting...

...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...

...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...

makandra dev

...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...

...of scope chaining. end end Explanation Note a couple of things: Every controller action reads or changes a single model. Even if an update involves multiple models,

...Standard implementation (with caching) We can improve the performance of our controllers by having reading actions (#show, #index) set ETag and Last-Modified response headers using #fresh_when

makandra dev

...Since this is a bit slow, especially when using multiple processes with parallel_test, read this card. jQuery If you still require jQuery, add it to your webpacker project by...

...tier (in Bootstrap e.g. "xs" or "md") without duplicating breakpoints to JavaScript: you can read the current breakpoint tier(s) in JavaScript...

...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...

...in your core User model. Prefer to use a form model like User::RegistrationForm. Read our book Growing Rails Applications in Practice for details. Here is a test for the...

...general suggestions. Before you start, talk to someone who has done it before, and read the following hints: Understand the old system Before any technical considerations, you need to understand...

...same object in memory, instead of loading another copy of the same record. Please read this great section about bi-directional associations from the Rails API for details.

...Installed at (1.4.1): /home/arne/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0 (1.3.5, default): /home/arne/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0 Interactive Ruby command-line tool for REPL (Read Eval Print Loop). Type gem help info to see a list of available switches.

...Dependency.new("reline", Gem::Requirement.new([">= 0.3.0"]), :runtime)] s.description = "Interactive Ruby command-line tool for REPL (Read Eval Print Loop)." s.email = ["keiju@ruby-lang.org"] s.executables = ["irb"] s.files = ["exe/irb"] s.homepage = "https://github.com/ruby/irb" s.licenses = ["Ruby...

jakearchibald.com

...reason why callbacks are not executed in the order that they are queued. Please read this article! This is an extract of the example in the article which demonstrates the...

...might leak memory: @app.directive 'awesomeMap', -> link: (scope, element, attributes) -> AwesomeMap.init(element) To prevent leaks, read the plugin's documentation for a way to destroy the plugin instance when you're...

...to issues, since string comparisons are case-insensitive in MySQL. (If you use PostgreSQL, read this instead.) Say you have a user model class User < ActiveRecord::Base validates_uniqueness_of...

...can reference global variables with an english name. This makes you code easier to read and is also suggested by Rubocop's Style/GlobalVars cop. Example before: if 'foo' =~ /foo/

...SEPARATOR => $, $RS => $/ $INPUT_RECORD_SEPARATOR => $/ $ORS => $\ $OUTPUT_RECORD_SEPARATOR => $\ $INPUT_LINE_NUMBER => $. $NR => $. $LAST_READ_LINE => $_ $DEFAULT_OUTPUT => $> $DEFAULT_INPUT => $< $PID => $$ $PROCESS_ID => $$ $CHILD_STATUS => $? $LAST_MATCH_INFO => $~ $IGNORECASE => $=

jetbrains.com

...top-right editor corner (or hit Ctrl + Shift + Y) and select "Start Session". Choose permissions: "Read-only" lets others only watch you. "Edit files" is needed for pairing. Note that...

makandra dev
thoughtbot.com

...The article explains about how sharing setup between examples make test files harder to read and evolve. A related frustration I have is working on ultra-DRY & betterspecs-like test...

...to keep your test databases clean, if you're running multiple databases with full read and write access at the same time. This is especially useful when migrating old/existing databases...

...class MigrationRecord < ActiveRecord::Base self.abstract_class = true connects_to database: { writing: :my_app_migration, reading: :my_app_migration } # You never want to allow write access to the database you are...

...plain Net::HTTP: OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed Here is how to fix that in your application...

...RestClient.get('https://self-signed.badssl.com/') RestClient::SSLCertificateNotVerified: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed Self-signed certificates are basically fine, they were simply...

...user into the ETag of all actions def show ... end def index ... end end Read more Default controller implementation (with caching...