# Controller calling ..?

**URL:** <https://www.ruby-forum.com/t/controller-calling/172013>\
**Category:** Rails\
**Created:** [July 13, 2009, 12:04pm UTC](https://www.ruby-forum.com/t/controller-calling/172013 "2009-07-13T12:04:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [July 13, 2009, 12:04pm UTC](https://www.ruby-forum.com/t/controller-calling/172013/1 "2009-07-13T12:04:49Z")

</div>

How can i call a function/method defined in a controller into another  
view … ?

---

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [July 13, 2009, 3:21pm UTC](https://www.ruby-forum.com/t/controller-calling/172013/2 "2009-07-13T15:21:03Z")

</div>

Hermant,

this sounds lika a violation of the MVC pattern. You might want to  
rethink your design.

Regards  
Nicolai

---

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [July 13, 2009, 5:33pm UTC](https://www.ruby-forum.com/t/controller-calling/172013/3 "2009-07-13T17:33:44Z")

</div>

2009/7/13 Hemant B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):

> How can i call a function/method defined in a controller into another  
> view … ?

Possibly put the method in the model instead.

Colin

---

<div class="post-metadata">

**Author:** ![hemantborole](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/b782af/32.png) [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Post date:** [July 13, 2009, 7:42pm UTC](https://www.ruby-forum.com/t/controller-calling/172013/4 "2009-07-13T19:42:39Z")

</div>

Thanks Champs …  
Got it … 🙂

Colin L. wrote:

> 2009/7/13 Hemant B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid):
> 
> > How can i call a function/method defined in a controller into another  
> > view … ?
> 
> Possibly put the method in the model instead.
> 
> Colin
