I have a User model in rails with the following method:
def current_project
if(self.active_project != nil)
@project = Project.find(self.active_project)
end
end
Note: active_project is an integer field on User which corresponds to the id of the project they are working on.
When I get the xml version of the User model, the project only renders the id, not all the other fields on that model – title, description, etc.
What do I need to do get the xml version of User to render all of the properties of the Project?
I don’t get the use of having such a
current_projectmethod. Maybe you can give some more information? Right now it seems that a simpleshould work for your purpose. Am I missing something?
Edit: After reading the comments to the original thread
will do the job.