How do i call a controller action and just return to my temp

Could someone please tell me how i can call an action method in my
controller, but just complete the action and return to the current
template without reloading the current template?

is it worth puting the method in my controllers helper? how do you call
a method that is in the helper using link_to_remote(‘save’, :url =>
{:action => my_method})

any pointers would be great
Thanks

James S. wrote:

Could someone please tell me how i can call an action method in my
controller, but just complete the action and return to the current
template without reloading the current template?

is it worth puting the method in my controllers helper? how do you call
a method that is in the helper using link_to_remote(‘save’, :url =>
{:action => my_method})

any pointers would be great
Thanks

James I think you can use link_to_remote and just have a blank rjs
template. You’ll call an action with the link_to_remote.

However, one of the gotchas of ajax is that there’s no feedback to the
user that anything has happened when the call is successful. You might
want to consider putting in a visual effect or some cue on the page (via
that rjs template) to let the user know the action has occurred.

c.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs