Activity Graph

Page 1 of 1


[03:16:42] eduardo: has joined #ruby
[03:20:30] eduardo: Remote host closed the connection


[22:33:58] eduardo: has joined #ruby


[07:25:12] eduardo: has joined #RubyOnRails
[07:25:12] eduardo: has joined #ruby
[09:18:54] eduardo: Hi, when I block is called with instance_eval, `self` becomes the one of the callee, but how can I acces the outer self?
[09:27:31] eduardo: but if I do `old_self = self` before I will have access to old_self but only public methods.
[09:35:52] eduardo: perfect, that and instance_variable_get should work, thanks.
[10:36:25] eduardo: Ping timeout: 256 seconds


[00:13:00] eduardo: hi, everyone
[00:24:02] eduardo: does anyone know how to properly list products from 'outside' spree?
[00:26:03] eduardo: actually, just trying to pull four random items among the products list
[00:27:01] eduardo: no particular filter, just four random products
[00:27:11] eduardo: i have 20 or so
[00:28:04] eduardo: since i'm out of Spree scope, i'm calling this in my application_controller.rb: Spree::Product.last(4)
[00:28:44] eduardo: but that way it keeps showing at least one product, even if i've deleted all of them from the admin panel
[00:30:32] eduardo: oh, i see. let me try that Radar
[00:34:48] eduardo: worked perfectly. thanks a lot!