A lot of Ruby code is "magic". We'll explain the magic and see how it works using the powerful tools Ruby gives us.
Accept subscription and one-time payments with Stripe in your Rails apps
Building a simplified version of Instagram is a great way to learn Rails.
Expert advice on keeping Rails apps organized and fast.
Cheap, easy hosting for Ruby and Rails apps.
Launch your product business way faster with our SaaS template.
Translate your Ruby on Rails apps.
When things (users, jobs, etc) attempt to update the same record at the same time, we can often lose changes. Optimistic locking uses a lock version number to warn you about updating stale objects so you can handle that safely.
Race conditions can cause problems with data integrity. We can prevent these issues with Pessimistic Locking in ActiveRecord which uses database row-level locking.
Test Driven Development, or TDD, is a pretty simple process that allows you to write your code in conjunction with tests to ensure a high level of confidence and code coverage.
You can use Fixtures in Rails to create sample database records for your tests to run against. They're easy to setup and extremely quick.
Learn how to write integration tests in Rails to test controllers and actions
Testing integrations with external APIs in your Rails app can be hard. You don't know what requests are being made (or even the responses), so how can you properly mock them out? VCR to the rescue.
Rails provides several really useful test helpers for ActionMailer so we can quickly iterate on our design, test that our code queues up the right emails, and make sure our emails contain the right content.
Testing ActionCable authentication with Devise is pretty easy, especially when we build our own helpers to stub out Warden
Today we're refactoring Andrew Mason's GitHub Action that runs Rubocop against your repository. We'll pull out some concepts, remove conditionals, and use several other techniques to clean up the code.
Join 38,311+ developers who get early access to new tutorials, screencasts, articles, and more.
We care about the protection of your data. Read our
Icons by Icons8
© 2020 GoRails, LLC. All rights reserved.