Sha256: eb2a066a9941d0e62a514d13741538d37eb33a94416cda33b3282b5388d2fdd6
Contents?: true
Size: 1.46 KB
Versions: 16
Compression:
Stored size: 1.46 KB
Contents
;(function() { 'use strict'; function ProfileAnswers($resource) { var ProfileAnswerResource = $resource('/social_networking/profile_answers/:id', { id: '@id' }); function ProfileAnswer() {} ProfileAnswer.getAll = function() { return ProfileAnswerResource.query().$promise; }; ProfileAnswer.getOne = function(profile_id, profile_question_id) { return ProfileAnswerResource.get({ profile_id: profile_id, profile_question_id: profile_question_id }).$promise; }; // Persist a Goal to the server. ProfileAnswer.create = function(attributes) { var answer = new ProfileAnswerResource({ profile_id: attributes.profile_id, profile_question_id: attributes.profile_question_id, answer_text: attributes.answer_text || "" }); return answer.$save(); }; // Update a Goal on the server. ProfileAnswer.update = function(attributes) { var answer = new ProfileAnswerResource({ id: attributes.id, profile_id: attributes.profile_id, profile_question_id: attributes.profile_question_id, answer_text: attributes.answer_text || "" }); return answer.$save(); }; return ProfileAnswer; } angular.module('socialNetworking.services') .service('ProfileAnswers', ['$resource', ProfileAnswers]); })();
Version data entries
16 entries across 16 versions & 1 rubygems