On Oct 13, 11:56 am, Damjan Rems <rails-mailing-l...@andreas-s.net>
wrote:
> pepe wrote:
> > What do you mean by "restarting" the application? Do you mean end the
> > session (if any) and (re)display the login/index/initial page?
>
> > If you need to end a session you can do it with this:
>
> > reset_session
>
> > To send a user to the login/index/initial page you can just use a
> > redirect:
>
> > redirect_to :controller => 'my_controller', :action => 'my_action'
>
> > Both things are done in your controllers.
>
> > On Oct 13, 3:19 am, Damjan Rems <rails-mailing-l...@andreas-s.net>
>
> I would like to quit (kill) session. Just like pressing Ctrl+C.
>
> by
> TheR
>
> --
> Posted viahttp://www.ruby-forum.com/.
If you are running inside mongrels with monit I am sure you could
really do this quite easily...
controller:
def restart
`sudo monit restart -g mongrel all << server_sudo_password`
end
view:
<% link_to "Restart", :action => :restart %>
Of course because you CAN do something does not mean you SHOULD...
requires you put the sudo password in the code BAD BAD...
I have not tested it, because my dev system is not setup this way.
but looks like it would work.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---