Forum: Ruby on Rails ActionController::Verification problem

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.
06e1b396407b733b4b3d825cb2c57856?d=identicon&s=25 Leo -- (leopardus)
on 2006-03-16 20:09
(Received via mailing list)
Hello,

I have a subscriptions model and a 'new' action in subscriptions
controller to create new subscription. Also, I have a 'thankyou' view,
which I want to display only if user is just subscribed. So I want to
block access to http://localhost/subscriptions/thankyou action with a
 verify filter. Here is my code:

class SubscriptionsController < ApplicationController
  verify :only => :thankyou,
          :flash => :subscription,
	  :redirect_to => :index

    def index
      # new
      # render :action => 'new'
    end

  def thankyou
  end
end

I get

SystemStackError in Subscriptions#thankyou
stack level too deep

error.

Can't figure out, what is wrong. I suppose an eternal loop might be a
cause, but I don't see any in this simple code. Any hints?

Leo
This topic is locked and can not be replied to.