Articles of interest for Ruby on Rails
Displaying articles 151 - 175 of 479 in totalArticle Sources
-
How to write Controller & Integration Tests in Rails
Learn how to write integration tests in Rails to test controllers and actions
Published:
-
How to use Devise Test Helpers
Adding Devise test helpers allows you to quickly login a user for testing controllers in Rails
Published:
-
How to use Fixtures to create sample test data
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.
Published:
-
Test Driven Development Basics
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.
Published:
-
How to Test Validations in Rails
Learn how to write tests for validations on ActiveRecord objects in Ruby on Rails
Published:
-
How to use Multiple Databases in Rails 6.0
With Rails 6.0, you can now define multiple primary and replica databases, define separate migrations for each primary database, and configure each model to read and write from different databases.
Published:
-
Handle Race Conditions with Pessimistic Locking
Race conditions can cause problems with data integrity. We can prevent these issues with Pessimistic Locking in ActiveRecord which uses database row-level locking.
Published:
-
Preventing Conflicts with Optimistic Locking
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.
Published:
-
How to use AMP with Ruby on Rails
Learn how to add support for Accelerated Mobile Pages (AMP) from Google to Ruby on Rails in this tutorial
Published:
-
Ruby's Array() and Array.wrap
Learn how to remove conditionals and make your code simpler and more reliable using Ruby and ActiveSupport's Array wrap methods
Published:
-
How to use Twilio Markup Language (TwiML) in Rails
Reply to inbound SMS and phone calls using TwiML to create XML responses to Twilio conversations
Published:
-
Inbound SMS in Rails with Twilio
Receiving inbound SMS in Rails with Twilio is very similar to handling inbound emails with Action Mailbox
Published:
-
How to send SMS Messages in Rails with Twilio
Sending SMS or Text Messages in Ruby on Rails is really easy using an API like Twilio
Published:
-
Amazon Cloudfront CDN for Rails Asset Pipeline & Webpacker
A CDN can distribute assets globally and allow more parallel downloads. This equates to performance benefits for users anywhere in the world
Published:
-
Building a product in under 10 minutes with Jumpstart Pro
Jumpstart Pro is finally out today! We'll take a look at out to build a subscription content business with it in under 10 minutes
Published:
-
Notifications for ActionText User Mentions
When you at-mention a user, you typically want to send email or other types of notifications to alert that user they were mentioned. In this episode, we'll look into ActionText Content to see how we can extract the user mention attachments and do that.
Published:
-
How to save ActionMailbox inbound HTML emails and attachments with ActionText and ActiveStorage
In this episode, we will walk through how you can save the contents of inbound HTML emails from ActionMailbox using ActionText and attachments using ActiveStorage
Published:
-
How to use Action Mailbox in Rails 6
ActionMailbox is a new feature of Rails 6 for processing inbound emails to let users respond to your app via email. We'll do a quick rundown and build a simple reply by email feature to our app.
Published:
-
Actionable Errors in Rails 6
One of the coolest new features of Rails 6 is the introduction of Actionable Errors. These are errors you can provide actions on so when Rails complains you haven't run migrations you can now simply click a button to run them instead.
Published:
-
How to use Bootstrap with Webpack & Rails
Rails's webpacker gem makes it super easy to load both Bootstrap's CSS and JS into your Rails app using webpack
Published:
-
How to Remove Unused CSS Classes from Tailwind CSS, Boostrap, and more with PurgeCSS
CSS frameworks like Tailwind, Bootstrap, Foundation, etc all come with many CSS classes you probably aren't using. This creates huge CSS files unless we use a tool like PurgeCSS to look through our code and remove the unused classes.
Published:
-
How to install TailwindCSS 1.0 with Rails 6
With TailwindCSS 1.0 just around the corner and some changes in Rails 6 to Webpacker, we take a look at how to install and setup the latest version of TailwindCSS with Rails 6.0
Published:
-
How to use Javascript via Webpacker in Rails 6
Rails 6 defaults to using Webpacker for Javascript instead of the asset pipeline. We'll learn how everything is structured and laid out and see how to add Flatpickr to Rails 6 including both the Javascript and CSS for it.
Published:
-
The Rails db:system:change command
Changing the database adapter for a Rails app has always been an annoying, manual change to make. Rails 6.0 introduces the "rails db:system:change" command to make this easier using all the built-in generators for database.yml and more.
Published:
-
How to Contribute to Rails: Adding rich_text field generators
Contributing to Rails is everyone's dream. This episode we'll walk through how you can find a bug or feature to add to Rails, how to browse through the source code, add your feature and test it.
Published: