Displaying 1 result from an estimated 1 matches for "test_object_controller".
2006 May 06
0
Cant read an Array as an attribute of a record
...t_object.rb
------------------------------------------------------------------
class TestObject < ActiveRecord::Base
serialize :test_array
def initialize
@test_array = []
puts "Called constructor"
puts @test_array.size
# This Works!!!
end
end
Test/app/controllers/test_object_controller.rb
------------------------------------------------------------------
class TestObjectController < ApplicationController
def test_case
@test_object = TestObject.new
puts @test_object.test_array.size
# This doesn''t work!!!
end
end
http://localhost:3000/test_object/test_c...