Hi,
I have an controller with AS and with a plugin Authlogic to manage
login...
Class MyController < ApplicationController
before_filter :login_required
active_scaffold :my_model do |config|
....
config.action_links.add 'display_map', :label
=> :'dialvox.display_map', :inline => true, :page => false, :position
=> :top
...
end
end
and in lib/authentification.rb
...
def login_required
unless current_user
flash[:error] = "You must be identified to continue"
end
respond_to do |format|
format.html do
store_request_uri
redirect_to login_url
end
format.js do
store_controller_index
render :update do |page|
page.redirect_to login_url
end
end
end
return false
end
end
...
I call my controller to display the AS and later, if I am
disconnected, and I clicked on the action link "display map",
I have two messages displayed at the begin of my AS :
the first is : try { window.location.href = "" }
the second is : "You must be identified to continue"
This happens even for create, update, see action.. in fact, all ajax
methods..
why I can't redirect to the login page ?
VIncent
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---