Assume I have a model class Job include DataMapper::Resource property :qsid, Serial property :clientcode,String end
I know I can iterate through Job.properties to find out what the instance variables are called. Lets say I have: job = Job.first is there a way I can iterate through the instance variables without knowing what they are called? (I'm trying to DRY out some HAML template code that is populating a table with Job instances. Currently if I change the model, I have to change the template code by hand.) I can pass the Job.properties into my template to populate the header row for my HAML table by iterating through them, but is there a way to iterate through the instance variables of a Job instance in a similar way? -- You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to datamapper@googlegroups.com. To unsubscribe from this group, send email to datamapper+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/datamapper?hl=en.