Advanced Usages of Action Policy for Ruby on Rails
In part one of this series, we looked at some basic usages of Action Policy. Now we'll leverage Action Policy for more advanced authorization use cases. First up, let's explore applying pre-checks.
In part one of this series, we looked at some basic usages of Action Policy. Now we'll leverage Action Policy for more advanced authorization use cases. First up, let's explore applying pre-checks.
To keep your app secure, you need to control who and what can access it. Access control can be categorized into authentication — "who" to allow — and authorization — "what" they can access. Authentication is a subject for another day, but when it comes to user authorization, you generally have two ways to go about it: using a role-based or resource-based strategy. In this two-part series, we'll take a deep dive into using the Action Policy gem for a Ruby on Rails blog application.
In this series of posts, we will look at LiteStack, a one-stop-shop solution that hosts and processes all your production data on a single machine. LiteStack (as the name suggests) makes use of SQLite to provide: In this first post, we'll introduce the basics of LiteStack and set up an example Rails application. Let's begin!
Uncover the inner workings of Ruby on Rails with our dive into the Params hash—an essential component for handling HTTP requests. From query params to avoiding injection, this article will elevate your understanding of Rails, providing you with the tools to create more secure and efficient web applications.
In part one of this series, we introduced Devise using an example app to explore modules, helpers, views, controllers, and routes. In this part, we'll explore more advanced usages of Devise, specifically the use of OmniAuth, API authentication, and Authtrail. Let's dive straight in!
Rails' date and time helpers are great. They save us from duplicating simple add-duration-to-time logic across our applications and make the code more readable. However, complex date manipulations are dangerous places full of edge-cases. This article discusses some of them.
If you want insights into your application's exceptions but don't have time to invest in adding verbose logic to your code, we've got some exceptional news: The AppSignal for Ruby gem 3.4.1 now supports the Rails error reporter! With this change, you can simplify your AppSignal integration, streamline your code and begin reporting errors on the fly without raising an error page and interrupting your user's flow.
Explore the future of asset pipelines in Rails with Propshaft! Discover how this cutting-edge technology enhances the management and delivery of assets while simplifying your development workflow.
In our last post, we examined the most common ways to organize business logic in Ruby on Rails. They all have advantages and drawbacks, and essentially, most do not leverage the full power of Object Oriented Programming in Ruby. This time, we will introduce another alternative that more naturally fits the mental models we apply when reasoning about the behavior of our applications: DCI.