I tried this approach but I'm having a problem in that where I'm storing the
default value isn't available in the model.
I'm basically duplicating the @current_user code and setting a
@current_project session variable via a before_filter in the
ApplicationControler.
In my Sample model I have the following code
after_initialize :init
def init
self.project_id ||= @current_project
end
However @current_project is nil. It's not set. I've even tried to directly
access the session via session[:project] but that also throws a nil value
exception and debugging show the session doesn't exist at this point of
execution.
Bob
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/hobousers/-/7Z9oCL1fCUUJ.
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/hobousers?hl=en.