Skip to content

Commit

Permalink
Rename Model.LocalStorage to Model.localStorage.
Browse files Browse the repository at this point in the history
  • Loading branch information
benpickles committed Sep 15, 2010
1 parent 01c557c commit 659aa09
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/model_local_storage.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Model.LocalStorage = function(klass) {
Model.localStorage = function(klass) {
if (!window.localStorage) {
return {
create: function(model, callback) {
Expand Down
10 changes: 5 additions & 5 deletions test/tests/model_local_storage.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module("Model.LocalStorage")
module("Model.localStorage")

if (window.localStorage) {
// localStorage tests
Expand All @@ -10,7 +10,7 @@ if (window.localStorage) {
}

localStorageTest("read", function() {
var Post = Model("post", { persistence: Model.LocalStorage })
var Post = Model("post", { persistence: Model.localStorage })

Post.persistence.read(function(models) {
equals(models.length, 0)
Expand All @@ -34,7 +34,7 @@ if (window.localStorage) {
})

localStorageTest("create, update, destroy", function() {
var Post = Model("post", { persistence: Model.LocalStorage })
var Post = Model("post", { persistence: Model.localStorage })

equals(Post.count(), 0)
equals(localStorage.length, 0)
Expand Down Expand Up @@ -82,15 +82,15 @@ if (window.localStorage) {
} else {
// localStorage not supported tests
test("read", function() {
var Post = Model("post", { persistence: Model.LocalStorage })
var Post = Model("post", { persistence: Model.localStorage })

Post.persistence.read(function(models) {
equals(models.length, 0)
})
})

test("create, update, destroy", function() {
var Post = Model("post", { persistence: Model.LocalStorage })
var Post = Model("post", { persistence: Model.localStorage })

equals(Post.count(), 0)

Expand Down

0 comments on commit 659aa09

Please sign in to comment.