# Writing a method that is accessible from any views as well as any controller

**URL:** <https://www.ruby-forum.com/t/writing-a-method-that-is-accessible-from-any-views-as-well-as-any-controller/154427>\
**Category:** Rails\
**Created:** [November 29, 2008, 12:40pm UTC](https://www.ruby-forum.com/t/writing-a-method-that-is-accessible-from-any-views-as-well-as-any-controller/154427 "2008-11-29T12:40:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrSBless](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/3bc359/32.png) [@MrSBless](https://www.ruby-forum.com/u/MrSBless)\
**Post date:** [November 29, 2008, 12:40pm UTC](https://www.ruby-forum.com/t/writing-a-method-that-is-accessible-from-any-views-as-well-as-any-controller/154427/1 "2008-11-29T12:40:02Z")

</div>

HI guys where should i have to write the method that it is  
accessibible from any controller and any views. When i write the  
method in application controller then it is accessible in controller  
only and when i write it on application helper it is accessible on  
views only. I even tried to write it as module in the lib and included  
in the application controller, in that case it becomes inaccessible in  
views.
