mirror of
https://github.com/onkelbeh/cheatsheets.git
synced 2026-08-15 13:34:53 +02:00
modella: update formatting
This commit is contained in:
@@ -52,6 +52,9 @@ user
|
||||
|
||||
```coffeescript
|
||||
Model.emit('event', [data...])
|
||||
```
|
||||
|
||||
```coffeescript
|
||||
record.emit('event', [data...])
|
||||
```
|
||||
|
||||
@@ -100,18 +103,16 @@ user
|
||||
```coffeescript
|
||||
MyPlugin = ->
|
||||
return (Model) ->
|
||||
```
|
||||
|
||||
```coffeescript
|
||||
Model.method = ...
|
||||
Model.prototype.method = ...
|
||||
Model.attr(...)
|
||||
```
|
||||
|
||||
```coffeescript
|
||||
Model
|
||||
```
|
||||
|
||||
A plugin is a function that returns a model decorator (ie, a function that takes in a model and returns a model).
|
||||
|
||||
### Memory
|
||||
|
||||
```coffeescript
|
||||
|
||||
Reference in New Issue
Block a user