Skip to content

Commit ea10ff0

Browse files
Merge branch 'master' into master
2 parents c4f11e9 + 9b2ca21 commit ea10ff0

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Configure it via Meteor settings:
5353
```
5454

5555
To see what you can configure under `"redis": {}` take a look here:
56-
https://www.npmjs.com/package/redis#options-object-properties
56+
https://github.com/redis/node-redis/blob/HEAD/docs/client-configuration.md
5757

5858
```bash
5959
meteor run --settings settings.json

docs/how_it_works.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ We override the mutators from the Collection: `insert`, `update`, `upsert` and `
1010
sent to the database.
1111

1212
Let's take an example:
13-
```
13+
```js
1414
const Items = new Mongo.Collection('items')
1515
Items.insert({text: 'Hello'})
1616
```
@@ -19,7 +19,7 @@ After the insert is done into the database, we will publish to redis channel "it
1919
that we did an insert, and the *_id* of the document we inserted.
2020

2121
For an update, things get a bit interesting in the back:
22-
```
22+
```js
2323
Items.update(itemId, {
2424
$set: { text: 'Hello World!' }
2525
})
@@ -31,7 +31,7 @@ The reason we do this will be explored later in this document. (Direct Processin
3131
We send to redis the update event along with the document *_id* and the fields that have been changed.
3232

3333
If you choose to update multiple elements based on a selector:
34-
```
34+
```js
3535
Items.update({archived: false}, {
3636
$set: {archived: true}
3737
}, {multi: true})
@@ -48,7 +48,7 @@ Removing something is almost the same concept as updates, except ofcourse the ev
4848

4949
When you create a publication in Meteor you return a cursor or an array of cursors. For example:
5050

51-
```
51+
```js
5252
Meteor.publish('my_items', function () {
5353
return Items.find({userId: this.userId});
5454
})
@@ -66,7 +66,7 @@ will share the same "watcher".
6666

6767
There is another special use-case for listening to changes, and it is related to cursor that are filtered by _ids. We call this "Direct Processing"
6868

69-
```
69+
```js
7070
Meteor.publish('items', function () {
7171
return Items.find({_id: {$in: ids}});
7272
// this has the same behavior when you have a selector like {_id: 'XXX'}
@@ -85,7 +85,7 @@ This is one of the most efficient ways to catch changes and process them. The co
8585

8686
We extend the mutators `insert`, `update` and `remove` to allow an extra argument that configures the mutation.
8787

88-
```
88+
```js
8989
// no changes will be published to any redis channels
9090
Collection.insert(document, {pushToRedis: false})
9191
Collection.update(selector, document, {pushToRedis: false})

lib/cache/ObservableCollection.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,7 @@ export default class ObservableCollection {
3131
this.cursorDescription = cursorDescription;
3232

3333
this.collectionName = this.cursorDescription.collectionName;
34-
this.collection = Mongo.Collection.__getCollectionByName(
35-
cursorDescription.collectionName
36-
);
34+
this.collection = Mongo.getCollection(cursorDescription.collectionName);
3735

3836
if (!this.collection) {
3937
throw new Meteor.Error(

0 commit comments

Comments
 (0)