[Rails] Re: Singleton Object nil

2009-07-23 Thread Tyler Knappe
Frederick Cheung wrote: > On Jul 22, 10:05�pm, Tyler Knappe > wrote: > >> >> The problem here is when accessing @devices_array in the view >> @devices_array is nil. �I *know* the code is being executed in >> initialize_devices because if I don't redirect to show_all_devices I can >> manipulate t

[Rails] Re: Singleton Object nil

2009-07-23 Thread Frederick Cheung
On Jul 22, 10:05 pm, Tyler Knappe wrote: > > The problem here is when accessing @devices_array in the view > @devices_array is nil.  I *know* the code is being executed in > initialize_devices because if I don't redirect to show_all_devices I can > manipulate the @devices_array within the init

[Rails] Re: Singleton Object nil

2009-07-22 Thread Tyler Knappe
Tyler Knappe wrote: > Hey all, > > I have the following in my Controller: > > class << self > attr_accessor :all_devices, :test > #def initialize(devices) > # @all_devices = devices > #end > end > > def initia