It should work so long as the environment where you load the YAML has
the correct definition of the Address class. In your first example
(where it isn't working right), you should be able to add something
before your YAML.load like:
require 'address'
where the file address.rb has the class definition of Address. Without
that, Ruby can't actually instantiate the Address class so you just
get the YAML::Object object that you're seeing.
···
On Dec 14, 11:38 am, Fransiscus Xaverius <homebeautyp...@yahoo.co.id> wrote:
This was already saved in my database :
c.lawsuit.customer_service_location
=> "--- !ruby/object:Address \nattributes: \n created_on: 2006-02-24
12:30:19 \n city: Alex City\n line1: 441 Saint Bernard Drive\n zip:
\"35086\"\n ''\n id: \"124\"\n contact_detail_id: \"128\"\n detail_key:
Home Address \n state: AL"
On Dec 14, 11:38 am, Fransiscus Xaverius <homebeautyp...@yahoo.co.id> > wrote:
12:30:19", "city"=>"Alex City", "line1"=>"441 Saint Bernard Drive",
--
Posted viahttp://www.ruby-forum.com/.
It should work so long as the environment where you load the YAML has
the correct definition of the Address class. In your first example
(where it isn't working right), you should be able to add something
before your YAML.load like:
require 'address'
where the file address.rb has the class definition of Address. Without
that, Ruby can't actually instantiate the Address class so you just
get the YAML::Object object that you're seeing.