# Rest and Tagging

**URL:** <https://www.ruby-forum.com/t/rest-and-tagging/81082>\
**Category:** Rails\
**Created:** [January 3, 2007, 6:01pm UTC](https://www.ruby-forum.com/t/rest-and-tagging/81082 "2007-01-03T18:01:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike\_Rumble](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/c0e974/32.png) [@Mike\_Rumble](https://www.ruby-forum.com/u/Mike_Rumble)\
**Post date:** [January 3, 2007, 6:01pm UTC](https://www.ruby-forum.com/t/rest-and-tagging/81082/1 "2007-01-03T18:01:33Z")

</div>

Hi,

I’ve taken the plunge and am using the great new rest approach to  
building my latest web-app extravaganza. So far so good, and the  
examples I’ve seen on the web make perfect sense, the Peepcode video in  
particular was a great help.

One area which I am struggling with though is how to fold the  
requirement of tagging in to a restful app, infact now that I think  
about it, my confusion about this might stem from some  
less-than-perfect application design, so I’m throwing it out here and  
hoping some nice Rails geniuses will be able to offer some advice.

Essentially my app has users, posts, tags and comments.

- Users can make and tag posts.
- Users should also have a page which show their posts and their tags,  
they also have a page for each of their tags showing just the posts  
tagged with that tag.
- There’s a global page which shows all posts from all users.
- There’s should also be global tag pages which shows just the posts  
tagged with that tag from all users.
- Each post has a link to an individual post page which has comments.

So far so [del.icio.us](http://del.icio.us)…

Thus far I’ve got a ‘posts’ controller which is in charge of showing  
all the posts from all users, and the general CRUD stuff for the ‘post’  
model.

I’ve also got a ‘users’ controller, created by the  
‘restful\_authentication’ plugin, to which I’ve also added a ‘show’  
action which is what I’ve used to show the posts of individual users,  
although I’m not sure that this is where I should be doing this.

URL wise it looks something like this…

/posts → list all posts  
/posts/1 → show post and comments  
/users/1 → show all posts by user

So my next step is to get tagging working but I’m not sure what’s the  
best way to go about doing this whilst still maintain the apps  
restful-ness. Is the acts\_as\_taggable plugin suitable for this sort of  
use?

Anybody who’s has any experience implementing tagging in a restful app  
out there who can share some of their wisdom?

Many thanks,  
Mike.
