Forum: Rails I18n problem in before_filter

Posted by Preethi Sivakumar (preethi)
on 2009-02-09 12:34
Hi,

I've a session data that is generated when a user logs in.
I'm trying to access that session data, in before_filter, in a different
controller for passing parameter to the before_filter function.

before_filter :only => [:index] do |obj|
    user = session[:user]
    has_permission_in_any(user.id,component_id,permission_id,user.communities)
end

But i'm not able to do that. What might be the reason?

One more thing,
I'm not able to call params[],redirect,or anything inside before_filter.
Could anyone help? Thanks
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.