# Help with account location plugin

**URL:** <https://www.ruby-forum.com/t/help-with-account-location-plugin/112793>\
**Category:** Rails\
**Created:** [August 23, 2007, 10:12am UTC](https://www.ruby-forum.com/t/help-with-account-location-plugin/112793 "2007-08-23T10:12:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robin\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c2a13f/32.png) [@Robin\_F](https://www.ruby-forum.com/u/Robin_F)\
**Post date:** [August 23, 2007, 10:12am UTC](https://www.ruby-forum.com/t/help-with-account-location-plugin/112793/1 "2007-08-23T10:12:56Z")

</div>

Hi All,

I’m using the account\_location plugin and have got it setup OK so that  
when I view the index action in my controller, the objects displayed  
are those restricted to that account (done by an account\_id attribute  
on the model).

My problem is that when I move on to the show action e.g. objects/1 I  
can change the id and access an object that doesn’t belong to that  
account.

I know I can fix this on an action by action basis but thought there  
must be a DRY way of doing this. All help appreciated.

Thanks

Robin

---

<div class="post-metadata">

**Author:** ![Robin\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c2a13f/32.png) [@Robin\_F](https://www.ruby-forum.com/u/Robin_F)\
**Post date:** [August 23, 2007, 11:09am UTC](https://www.ruby-forum.com/t/help-with-account-location-plugin/112793/2 "2007-08-23T11:09:00Z")

</div>

On 23 Aug 2007, at 10:11, Robin F. wrote:

> must be a DRY way of doing this. All help appreciated.  
> [http://agilewebdevelopment.com/plugins/scopecontrollermodel](http://agilewebdevelopment.com/plugins/scopecontrollermodel)

Haven’t used it yet, so please let me know how it works out for you.

Best regards

Peter De Berdt
