# Where should I write my helper's method with domain route?

**URL:** <https://www.ruby-forum.com/t/where-should-i-write-my-helpers-method-with-domain-route/129972>\
**Category:** Rails\
**Created:** [February 23, 2008, 11:04am UTC](https://www.ruby-forum.com/t/where-should-i-write-my-helpers-method-with-domain-route/129972 "2008-02-23T11:04:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [February 23, 2008, 11:04am UTC](https://www.ruby-forum.com/t/where-should-i-write-my-helpers-method-with-domain-route/129972/1 "2008-02-23T11:04:39Z")

</div>

I am using a domain route Admin

class Admin::MembersController \< ApplicationController

so I have my views in app \> views \> admin \> members  
and my helpers in app \> helpers \> admin \> members (module  
Admin::MembersHelper)

fine, it’s running well

in one of my application layouts partials , \_members.html.erb, I try to  
use a method  
\<%= filtrate(current\_user) %\>

but I get an error  
ActionView::TemplateError (undefined method `filtrate’ for  
#ActionView::Base:0x32ea330) on line #7 of layouts/\_members.html.erb:

I wrote the filtrate method in my Admin::MembersHelper … is it wrong ?  
why ?  
where should I write it ?

thanks for your help

---

<div class="post-metadata">

**Author:** ![kadoudal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f0a364/32.png) [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Post date:** [February 23, 2008, 11:41am UTC](https://www.ruby-forum.com/t/where-should-i-write-my-helpers-method-with-domain-route/129972/2 "2008-02-23T11:41:16Z")

</div>

> I wrote the filtrate method in my Admin::MembersHelper … is it wrong ?  
> why ?  
> where should I write it ?
> 
> thanks for your help

found the problem… I was trying to use the wrong helper,I should  
have look after the current controller at this time…
