<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/teach-your-models-to-act-not-just-be-z79b4tlbe" -->

---
title: Teach your models to act, not just be | daily.dev
description: Moving business logic from controllers and background jobs into Rails models creates more maintainable code. By teaching models to handle their own lifecycle...
canonical: https://daily.dev/posts/teach-your-models-to-act-not-just-be-z79b4tlbe
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Teach your models to act, not just be | daily.dev
og:description: Moving business logic from controllers and background jobs into Rails models creates more maintainable code. By teaching models to handle their own lifecycle...
og:url: https://daily.dev/posts/teach-your-models-to-act-not-just-be-z79b4tlbe
og:image: https://api.daily.dev/og/posts/z79b4tLBE.png
og:image:alt: Teach your models to act, not just be
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Teach your models to act, not just be

**[thoughbot](https://daily.dev/sources/thoughbot)** · 4 min read · 0 upvotes · 0 comments

## Summary

Moving business logic from controllers and background jobs into Rails models creates more maintainable code. By teaching models to handle their own lifecycle through methods like `start!`, `poll!`, and `finish!`, you centralize behavior where it belongs—with the data it operates on. This approach makes controllers and jobs naturally thin, improves code readability by matching business language, and simplifies future changes. The refactoring transforms anemic domain models that just hold data into rich models that know how to act.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://thoughtbot.com/blog/teach-your-models-to-act-not-just-be>

## Similar posts on daily.dev

- [The Rails Way in 2026](https://daily.dev/posts/the-rails-way-in-2026-lwaqok4v6) · arkency · 0 upvotes · 0 comments
- [What Rails Actually Wants: Tidying Controllers and Views Without Service Object Explosion](https://daily.dev/posts/what-rails-actually-wants-tidying-controllers-and-views-without-service-object-explosion-z7ssr3alm) · Ruby Flow · 2 upvotes · 0 comments
- [486: ActiveModel Everywhere](https://daily.dev/posts/486-activemodel-everywhere-razjkphew) · RUBYLAND · 2 upvotes · 0 comments
- [Dynamic Ruby And Hidden Maintenance Costs](https://daily.dev/posts/dynamic-ruby-and-hidden-maintenance-costs-jnxrbecmr) · RUBYLAND · 0 upvotes · 0 comments
- [Your Laravel Models Aren’t the Problem. Hidden Workflows Are.](https://daily.dev/posts/your-laravel-models-aren-t-the-problem-hidden-workflows-are--9bygcj25f) · CodeCraft Diary · 2 upvotes · 0 comments

---

Tags: [#architecture](https://daily.dev/tags/architecture), [#general-programming](https://daily.dev/tags/general-programming), [#rails](https://daily.dev/tags/rails), [#ruby](https://daily.dev/tags/ruby)

[View this post on daily.dev](https://daily.dev/posts/teach-your-models-to-act-not-just-be-z79b4tlbe)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Teach your models to act, not just be","url":"https://daily.dev/posts/teach-your-models-to-act-not-just-be-z79b4tlbe","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/teach-your-models-to-act-not-just-be-z79b4tlbe"},"datePublished":"2026-02-06T21:36:36.924Z","dateModified":"2026-03-15T08:18:08.175Z","description":"Moving business logic from controllers and background jobs into Rails models creates more maintainable code. By teaching models to handle their own lifecycle...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f90203dca15381d261423aa5e5db69c3?_a=AQAEunF","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/f90203dca15381d261423aa5e5db69c3?_a=AQAEunF","isAccessibleForFree":true,"articleSection":"thoughbot","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"thoughbot","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/9fe12feb57f944a29ff63a79e350081a","url":"https://daily.dev/sources/thoughbot"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/teach-your-models-to-act-not-just-be-z79b4tlbe","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"architecture,general-programming,rails,ruby","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"thoughbot","item":"https://daily.dev/sources/thoughbot"},{"@type":"ListItem","position":3,"name":"Teach your models to act, not just be"}]}
```

