Results 1 to 8 of 8
Jan 20, 2006, 09:34 #1
- Join Date
- Jun 2001
- In your basement
- 0 Post(s)
- 0 Thread(s)
Session data available in controller, but not model?
Ok, thanks to everyone who's helped me out so far... so close to being done with the boring parts
I have documents that upload, and I need to associate a id that's in a session to the document. What I have in my model is:
class Document < ActiveRecord::Base .. def before_save self.project_id = session[:project_id] .. end ..
However, it's available in the controller. Is there something I should be doing to get it there? Maybe im just not sure why session is local to the controller and not the model...Eric Coleman
We're consentratin' on fallin' apart
We were contenders, now throwin' the fight
I just wanna believe, I just wanna believe in us