...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...
...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...
...p2); // compiles fine 50% of the time // But crashes the other times: TypeError: Cannot read properties of null You must now conditionally check that the value is actually not null...
...Linear ID and the name of the issue using git commit --allow-empty -m Read the complete issue Reread the complete Issue and check if the issue needs further checkpoints...
...migrations, takes care of existing records if it makes major changes, has updated the README as appropriate 4 After Review 4.1 If your code does not pass review
Datei Berechtigungen Verstehe Zugriffsrechte für Dateien: Was bedeutet "ownership" bei Dateien? Kannst du read, write und executable Flags für Dateien erklären? Wie funktioniert die oktale Schreibweise für Berechtigungen?
...ein neues Verzeichnis, in dem du diverse Dateien anlegst. Einige der Dateien sollen world readable sein. Das Script muss prüfen, ob es sich dabei wirklich um ein Verzeichnis handelt.
...trying to hunt down a staging bug locally), it might make sense to allow reading files from a separate environment. You you could read from an ENV variable instead of...
...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...
...of earlier versions Check the official Rails upgrade guide Rails has official upgrade notes. Read through the relevant sections and make the appropriate changes. Get rails console running
...gives some additional security to the not-that-incredibly-secure hashed paths storage approach. Read here for details. Further reading Common mistakes when storing file uploads with Rails
...no instruction for a backup strategy nor a guide for SQL dump performance optimization. Read before starting I will assume that all commands will be executed as local postgres user...
...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...
...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...
...one in interface. Why are the floating IPs getting dropped by systemd-networkd/netplan? Read Prevent systemd from dropping IP-Addresses configured from other processes. What are the criteria for...
...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 => $=
...architecture. Most likely, you need to put [arch=amd64] after deb so that it reads deb [arch=amd64] https://... or deb [arch=amd64 signed-by=.... Workaround Step 2: Connect with...
...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...
.../LATEST_RELEASE" VERSION=$(curl -f --silent $VERSION_URL) if [ -z "$VERSION" ]; then echo "Failed to read current version from $VERSION_URL. Aborting." exit 1 else echo "Current version is $VERSION"
...whenever your Chrome is updated, run update-chromedriver and after one second you are ready to go. Example output: $ update-chromedriver Current version is 77.0.3865.40 Downloading to /tmp/chromedriver-77.0.3865.40.zip
...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...
...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...
Code comments allow for adding human readable text right next to the code: notes for other developers, and for your future self. You can imagine comments as post-its (or...
...concept. Probably it is a good idea to mention that concept in the project README, but it should direct the reader to the module for details. In the same manner...
Sharing test setup can lead to DRY, but tightly coupled test code. Read Prefer self-contained examples for an argument for isolating tests instead, even if it means...
...blog post on the official Ruby blog going into the details. You should probably read that, but here is a slightly abbreviated version: What changed When the last argument of...
...mail server listening Ensure that e-mail arrives at the inbox without being blocked Read about "E-mail deliverability" Skim over Kim's slides about sending mails from linux
In ruby you can easily read and write CSVs with the standard CSV library class. On top of this, you can use the gem smarter_csv for reading (not writing...