Redirect_to issue

I call redirect_to => :action ‘index’ many times throughout a couple
different methods. My problem with one of my methods (destroy) is that
when I call:

redirect_to => :action ‘index’

It takes me to /blah/index as opposed to /blah

I’m quite stumped. I’ve even just tried:

redirect_to => :controller ‘blah’

How can I get it so that it doesn’t append /index to the end? This is
only happening for one method, which isn’t any different from any of the
others.

Big oops, sorry, I meant:

redirect_to :action => ‘index’

and

redirect_to :controller => ‘blah’

Brendan Lim wrote:

I call redirect_to => :action ‘index’ many times throughout a couple
different methods. My problem with one of my methods (destroy) is that
when I call:

redirect_to => :action ‘index’

It takes me to /blah/index as opposed to /blah

I’m quite stumped. I’ve even just tried:

redirect_to => :controller ‘blah’

How can I get it so that it doesn’t append /index to the end? This is
only happening for one method, which isn’t any different from any of the
others.

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