SystemStackError from redirect_to

Hi

I've got a straightforward piece of code in my controller which will consistently produce a SystemStackError.

@newmessage = @message.reply(params[:newmessage]) return unless request.post? if @newmessage.save   flash[:notice] = "Message Sent"   redirect_to :index end

The error is occuring on the redirect_to line, if I comment that line out then everything behaves as it should. Does anyone have any ideas on what could be causing this?

Thanks

jebw

You probably wanted to write redirect_to :action => :index

Fred

Cheers, rather obvious.

Believe it or not I'm actually 2/3rds through this site. Sometimes I just can't see the wood for the trees :slight_smile:

jebw