Extracting Reusable Base Classes In Ruby
#483 · Pro
If you're building something with shared functionality, extracting a base class can be helpful to create a shared place each class can inherit from. We'll explore how to do this for our API clients and one of the tricky things about accessing constants.
ActiveSupport Concerns: Making A Duration Calculation Module
#479 · Pro
This episode is part 2 in a series about leveraging ActiveSupport::Duration. In this episode, we will look at how to build a reusable concern to setup relationships between models that allow them to automatically handle calculating and updating durations
How to Modify & Customize ActionText HTML Output in Rails
#453 · Pro
Ever needed to modify the HTML that ActionText renders? We can override the ActionText::Content class to modify the way HTML formatting works to customize the output. For example, we can add rel="noopener nofollow" to any anchor tags in the content.