force a page refresh from controller

Hi -

I'd like a simple way to call a method in the controller from a
partial that forces a reload of the page. This can be done in one of
at least 2 ways-

1) simply use a link_to but can i capture the url of the sending page
so I can redirect it back to itself? I want to use this functionality
from multiple actions and ids and want to refresh that specific action/
id combo.

2) I can use an ajax call and in the controller, somehow use
page.something, but I can't quite figure this out.

Any recommendations?

Thanks,
Dino

Hi -

I'd like a simple way to call a method in the controller from a
partial that forces a reload of the page. This can be done in one of
at least 2 ways-

1) simply use a link_to but can i capture the url of the sending page
so I can redirect it back to itself? I want to use this functionality
from multiple actions and ids and want to refresh that specific action/
id combo.

2) I can use an ajax call and in the controller, somehow use
page.something, but I can't quite figure this out.

Any recommendations?

How about:

link_to 'Refresh page', :action => controller.controller_action

Just doing it off the top of my head, but you get the idea.

Jamey

link_to 'Refresh page', :action => controller.controller_action

Thanks for the replies. But neither seems to do what I want. Maybe
I'm just not seeing the right approach so let me explain the problem.
I'm building a blog applicayion that lets a user subscribe to another
user's posts. Next to a post, I have a link for "subscribe to this
users posts" and originally, I had implemented it in ajax. When a
user clicked on it, it would just refresh that div and say "You are
subscribing to this user's posts." But, if that user had another post
on the page, you would get inconsistent feedback. Is there a better
way to deal with this than a page refresh?

Thanks,
Dino