{"comment":{"created_at":"2011-10-27T03:30:19Z","body":"Oh the other thing is that, as can be seen with the goal.tasks.newRecord call, that the second syntax is more consistent with how you create new records for collections, which I like. ","updated_at":"2011-10-27T03:30:19Z","url":"https://api.github.com/repos/cayasso/oomvc/issues/comments/2539339","id":2539339,"user":{"gravatar_id":"9c877363185e5f88c09aa28140c1a770","avatar_url":"https://secure.gravatar.com/avatar/9c877363185e5f88c09aa28140c1a770?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/noctivityinc","id":78850,"login":"noctivityinc"}},"action":"created","issue":{"number":14,"created_at":"2011-10-27T03:29:12Z","pull_request":{"diff_url":null,"patch_url":null,"html_url":null},"body":"   \r\nIn one of your samples I noticed this syntax, which I think is still correct or usable:\r\n\r\n      var g = new Goal({});\r\n\tg.title = 'This is my goal title';\r\n\tg.notes = 'This is my goal note';\r\n\tg.save();\r\n\r\n\r\n    var task =  new goal.task.newRecord('task_a');\r\n\r\nWhat I'm wondering, for consistency sake, is if I can do this:\r\n\r\n     var Goal = new Goal();\r\n     var g = Goal.newRecord();\r\n\tg.title = 'This is my goal title';\r\n\tg.notes = 'This is my goal note';\r\n\tg.save();\r\n\r\nTo me that makes more sense since I'm creating a class level variable \"Goal\" and the. A new instance of that class called \"goal.\". It don't matter to me if the first version also works, but I wanted to check if this syntax would work as well. \r\n\r\nThx\r\n\r\n","comments":1,"title":"Can I use class and instance vars for new records and the like?","updated_at":"2011-10-27T03:30:19Z","url":"https://api.github.com/repos/cayasso/oomvc/issues/14","id":2064194,"assignee":null,"milestone":null,"closed_at":null,"user":{"gravatar_id":"9c877363185e5f88c09aa28140c1a770","avatar_url":"https://secure.gravatar.com/avatar/9c877363185e5f88c09aa28140c1a770?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","url":"https://api.github.com/users/noctivityinc","id":78850,"login":"noctivityinc"},"html_url":"https://github.com/cayasso/oomvc/issues/14","labels":[],"state":"open"},"legacy":{"issue_id":2064194,"comment_id":2539339}}