Forum: Ruby on Rails direct to same page

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
F2b6d7bf3a3d324a5d0fb4894923d372?d=identicon&s=25 xxmithila (Guest)
on 2008-11-09 11:51
(Received via mailing list)
Hi guys....

   I want to drict again same page after submitting values to another
methode in the controller.



ex::

Im in

    post.rhtml

I submit some data to methode


    def mail

    end

then I want to direct again to post.rhtml  page with submission
success message.


please help me.....
mithila
2b891e820c238ded365d035771603f21?d=identicon&s=25 Bill Walton (Guest)
on 2008-11-09 23:06
(Received via mailing list)
Hi,

xxmithila

>    I want to drict again same page after submitting values to another
> methode in the controller.

redirect_to :back

should do it for you.

HTH,
Bill
F2b6d7bf3a3d324a5d0fb4894923d372?d=identicon&s=25 mithila karunarathna (Guest)
on 2008-11-10 08:15
(Received via mailing list)
thankx,
 I'll try it.
C4bfcc81ac9281cb905f38e97e4d4e0b?d=identicon&s=25 Shandy Nantz (snantz)
on 2008-11-10 16:17
xxmithila wrote:
> Hi guys....
>
>    I want to drict again same page after submitting values to another
> methode in the controller.
>
>
>
> ex::
>
> Im in
>
>     post.rhtml
>
> I submit some data to methode
>
>
>     def mail
>
>     end
>
> then I want to direct again to post.rhtml  page with submission
> success message.
>
> please help me.....
> mithila

You could always use a link_to_remote or form_remote_tag to submit some
data and then just update a div in that page or do nothing. Your app
would appear to run more smoothly if you avoided having to reload the
page again, just a thought.
This topic is locked and can not be replied to.