check the code of your InstitutionsController and ApplicationController -- look for statements with current_user
or before_filter
in them
class InstitutionsController < ApplicationController
before_filter :login_required, :only => [:method1,:method2]
...
end
could be that the method you are trying to call is listed as requiring authentication, but you are not logged in.
Can you also post an excerpt of your InstitutionsController with the preview method in it?
Another possible problem is that your route might be defined incorrectly:
match 'visit/schedule/preview' => 'institutions#previewselectedvisits', :as => :preview_visits, :via => :get
does the InstitutionsController really have a method called previewselectedvisits
?