Skip to content

Commit

Permalink
Tweak README regarding server timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentwoo committed Mar 27, 2015
1 parent e1345c2 commit 6a29960
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Expand Up @@ -39,10 +39,13 @@ You can now pass custom query options to firebase:
response = firebase.push("todos", :limit => 1)
```

To populate a value with a Firebase server timestamp, you can pass in a key of ```Firebase::ServerValue::TIMESTAMP```:
To populate a value with a Firebase server timestamp, you can set `Firebase::ServerValue::TIMESTAMP` as a normal value. This is analogous to passing `Firebase.ServerValue.TIMESTAMP` in the [official JavaScript client](https://www.firebase.com/docs/web/api/servervalue/timestamp.html).

```ruby
response = firebase.push("todos", { :name => 'Pick the milk', :created => Firebase::ServerValue::TIMESTAMP })
response = firebase.push("todos", {
:name => 'Pick the milk',
:created => Firebase::ServerValue::TIMESTAMP
})
```

So far, supported methods are:
Expand Down

0 comments on commit 6a29960

Please sign in to comment.