---
title: "How to find god objects in your project (Rails)"
description: "Go to your project root and cd into app/models (using CLI obviously) then run wc -lw \\ | sort -u*"
canonical: https://oozou.com/til/how-to-find-god-objects-in-your-project-rails-40
locale: en
date: 2020-10-13
topic: ruby-on-rails
---

# How to find god objects in your project (Rails)

> Go to your project root and cd into app/models (using CLI obviously) then run wc -lw \ | sort -u*

Published: 2020-10-13 · Topic: [ruby on rails](https://oozou.com/til-topics/ruby-on-rails) ([markdown](https://oozou.com/til-topics/ruby-on-rails.md))

Go to your project root and *cd* into *app/models* (using CLI obviously) then run *wc -lw \* | sort -u*

```shell
$ wc -lw * | sort -u
103     186 deal_broker.rb
116     313 physical_sim_report.rb
126     229 coupon_code.rb
126     260 subscription_mission.rb
129     284 payment.rb
145     290 deal_value.rb
147     255 single_use_coupon.rb
166     344 sim_card.rb
166     406 coupon_campaign.rb
225     451 order_summary.rb
260     534 deal.rb
308     783 package.rb
443    1031 user.rb
728    1744 subscription.rb
7262   15841 total
```

So now you can see *Rocky* is all about **User** ,**Subscription** and **Package**.

**Note**: *First column number of lines and the second column number of words.*

---

Contact OOZOU: hello@oozou.com · +66 2544 0000 · https://oozou.com/contact

More for AI agents: https://oozou.com/llms.txt · every page has a markdown twin at its URL plus ".md"
