# Edit message property in messages list

**URL:** <https://www.ruby-forum.com/t/edit-message-property-in-messages-list/168053>\
**Category:** Rails\
**Created:** [May 15, 2009, 10:45am UTC](https://www.ruby-forum.com/t/edit-message-property-in-messages-list/168053 "2009-05-15T10:45:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![term](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/34f0e0/32.png) [@term](https://www.ruby-forum.com/u/term)\
**Post date:** [May 15, 2009, 10:45am UTC](https://www.ruby-forum.com/t/edit-message-property-in-messages-list/168053/1 "2009-05-15T10:45:50Z")

</div>

I’m writing a web-based organizer of email messages.

Let’s say I have boolean “Marked as Important” property for each  
message. I display it with an icon in the list of messages (for each  
message in list).  
And I want to give user ability to change this property by clicking  
this icon right to particular message in the messages list, just like  
the “Starred” icon in Gmail.

I’m a newbie in RoR, so my suggestion is to add some action in the  
messages controller (“mark\_as\_important”, for example) and try to make  
it work almost like Update action: it should inverse boolean “Marked  
as Important” property of message, update it and redirect back to  
messages list (I don’t want to use AJAX for the first time, may be  
I’ll add it later).

How can I do this? Do I really need to add specific action in the  
controller or I can use Update action (in this case, what code should  
I place there?)?
