# כיצד לגשת למודל אחר ב-connector?

**URL:** <https://meta.discourse.org/t/how-to-access-a-different-model-in-a-connector/198916>\
**Category:** Development\
**Created:** [2 באוגוסט,‏ 2021,‏ 5:04pm UTC](https://meta.discourse.org/t/how-to-access-a-different-model-in-a-connector/198916 "2021-08-02T17:04:48Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Nacho\_Caballero](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nacho_caballero/32/130189_2.png) [@Nacho\_Caballero](https://meta.discourse.org/u/Nacho_Caballero)\
**Post date:** [2 באוגוסט,‏ 2021,‏ 5:04pm UTC](https://meta.discourse.org/t/how-to-access-a-different-model-in-a-connector/198916/1 "2021-08-02T17:04:48Z")

</div>

I’m pretty close, but I can’t figure it out. I’ve created a connector here `connectors/revision-user-details-after`:

 ![CleanShot 2021-08-02 at 18.52.58@2x](https://global.discourse-cdn.com/meta/original/3X/b/3/b385b451d541900cbdf3e422ec0fda3864a694d0.png)

In my connector class, I can access `args` and `component` via the `shouldRender` method, which lets me access the current username and the post id:

```js
export default {
  shouldRender(args, component) {
    console.log('postAuthor', args.model.username)
    console.log('postId', args.model.id)
  }
};

```

I’d also like to get the username of the user who _edited_ the post (in this case, “nachocab”), but `args.model` is a Post, not a PostRevision.

This is what the history modal looks like:

[https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/templates/modal/history.hbs#L5](https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/templates/modal/history.hbs#L5)

And the history controller:

[https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/controllers/history.js#L74](https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/controllers/history.js#L74)

How can I access the revision in the connector?

---

_[View the full topic](https://meta.discourse.org/t/how-to-access-a-different-model-in-a-connector/198916)._
