Displaying 1 result from an estimated 1 matches for "include_has_options".
2009 Jan 21
3
Nested serialization with to_json and to_xml with array and hash element
Title: Nested serialization with to_json and to_xml with array and
hash element
class Person < ActiveRecord::Base
	has_one :address
	has_one :job
	def office()
		return "Executive_Suite"
	end
end
class Address < ActiveRecord::Base
	belongs_to :person
end
class Job < ActiveRecord::Base
	belongs_to :person
	has_one :paygrade
	def Title
		return "Engineer"
	end
end