# Just Curious: How exactly does profile views work?

**URL:** <https://meta.discourse.org/t/just-curious-how-exactly-does-profile-views-work/42202>\
**Category:** Development\
**Created:** [April 7, 2016, 9:18pm UTC](https://meta.discourse.org/t/just-curious-how-exactly-does-profile-views-work/42202 "2016-04-07T21:18:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stevenpslade](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stevenpslade/32/53550_2.png) [@stevenpslade](https://meta.discourse.org/u/stevenpslade)\
**Post date:** [April 7, 2016, 9:18pm UTC](https://meta.discourse.org/t/just-curious-how-exactly-does-profile-views-work/42202/1 "2016-04-07T21:18:15Z")

</div>

I have been exploring the `UserProfileViews` model and the `User` controller hoping to find out exactly how this feature works. I get the basics of how it’s sending the current user’s id and the profile’s user id to the DB but what triggers saying, “Hey, this user is on this profile!”

Is it as simple as, this user just went to `user/anotheruser/activity`? If so, where is this reflected in the code?

---

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [April 7, 2016, 9:27pm UTC](https://meta.discourse.org/t/just-curious-how-exactly-does-profile-views-work/42202/2 "2016-04-07T21:27:56Z")

</div>

If you look in discourse/config/routes.rb you will see how the route is defined.  
Which calls the UsersController then the show method in that controller.
