# Calling a non-default method of my controller in my views?

**URL:** <https://www.ruby-forum.com/t/calling-a-non-default-method-of-my-controller-in-my-views/195342>\
**Category:** Rails\
**Created:** [September 21, 2010, 11:13pm UTC](https://www.ruby-forum.com/t/calling-a-non-default-method-of-my-controller-in-my-views/195342 "2010-09-21T23:13:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![rodrigo3n](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a8b319/32.png) [@rodrigo3n](https://www.ruby-forum.com/u/rodrigo3n)\
**Post date:** [September 21, 2010, 11:13pm UTC](https://www.ruby-forum.com/t/calling-a-non-default-method-of-my-controller-in-my-views/195342/1 "2010-09-21T23:13:55Z")

</div>

Hello everyone, I have a messages\_controller, inside this controller,  
among all the default methods I have a tweet method that sends the  
message to twitter, and aside the ‘edit’ and ‘destroy’ links I want a  
'tweet

---

<div class="post-metadata">

**Author:** ![rodrigo3n](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a8b319/32.png) [@rodrigo3n](https://www.ruby-forum.com/u/rodrigo3n)\
**Post date:** [September 22, 2010, 7:14am UTC](https://www.ruby-forum.com/t/calling-a-non-default-method-of-my-controller-in-my-views/195342/2 "2010-09-22T07:14:23Z")

</div>

rodrigo3n wrote:

> Hello everyone, I have a messages\_controller, inside this controller,  
> among all the default methods I have a tweet method that sends the  
> message to twitter, and aside the ‘edit’ and ‘destroy’ links I want a  
> 'tweet

You can specify this ‘tweet’ method as a member action of your  
controller in routes.rb

T.Veerasundaravel.  
[http://tinyurl.com/25vma7h](http://tinyurl.com/25vma7h)  
@veerasundaravel

---

<div class="post-metadata">

**Author:** ![rodrigo3n](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a8b319/32.png) [@rodrigo3n](https://www.ruby-forum.com/u/rodrigo3n)\
**Post date:** [September 22, 2010, 1:09pm UTC](https://www.ruby-forum.com/t/calling-a-non-default-method-of-my-controller-in-my-views/195342/3 "2010-09-22T13:09:55Z")

</div>

first watch this to understand what you have to do

> **[\#35 Custom REST Actions - RailsCasts](http://railscasts.com/episodes/35-custom-rest-actions)**
>
> Short Ruby on Rails screencasts containing tips, tricks and tutorials. Great for both novice and experienced web developers.

then watch this to see how it was upgraded in rails 3

> **[\#203 Routing in Rails 3 - RailsCasts](http://railscasts.com/episodes/203-routing-in-rails-3)**
>
> Short Ruby on Rails screencasts containing tips, tricks and tutorials. Great for both novice and experienced web developers.
