Preserve LSpace when this Proc is run.
Preserve LSpace when this Proc is run. Returns a new Proc, a closure that re-enters the current LSpace when it is called.
Examples:
todo = LSpace.new :user_id => 2 do proc{ LSpace[:user_id] }.in_lspace end todo.call == 2
Returns:
A version of self that re-enters LSpace before running
See Also:
79 80 81
# File 'lib/lspace/core_ext.rb', line 79 def in_lspace LSpace.preserve(&self) end