Skip to content

Commit

Permalink
fix a problem where errors where shared by models
Browse files Browse the repository at this point in the history
  • Loading branch information
jpboudreault committed Sep 5, 2014
1 parent 24fb816 commit 8184289
Show file tree
Hide file tree
Showing 11 changed files with 437 additions and 2 deletions.
1 change: 1 addition & 0 deletions .idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/copyright/profiles_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 24 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions .idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/scopes/scope_settings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

347 changes: 347 additions & 0 deletions .idea/workspace.xml

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions angular-activerecord-1.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

3 changes: 1 addition & 2 deletions angular-activerecord.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ angular.module('ActiveRecord', []).factory('ActiveRecord', ['$http', '$q', '$par
if (options.urlRoot) {
this.$urlRoot = options.urlRoot;
}
this.$errors = {};
},

$hasAttributes: function(attrs) {
Expand Down Expand Up @@ -290,8 +291,6 @@ angular.module('ActiveRecord', []).factory('ActiveRecord', ['$http', '$q', '$par

$fieldTranslations: {},

$errors: {},

$isValid: function(fieldName) {
var valid = false;
if (Object.keys(this.$errors).length === 0) {
Expand Down

0 comments on commit 8184289

Please sign in to comment.