I have a form that has a virtual attribute 'contact_name'. In the setter method for this, I need to scope the query through current_user.contacts.find (etc). But current_user is a helper method (RESTful authentication) and it is apparently not available in the model (where the setter method is located). I tried.. [code=]@current_user = User.find(params[:user_id]) @contact = @current_user.contacts.find (etc)[/code] .. but the params hash too is not available. How can I scope the query through the current_user in the model file?
anyone got any ideas? i really need a solution for this to get a feature working.