Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ben-ng/geddy-model-inheritance
A small demo on how to extend models in Geddy
https://github.com/ben-ng/geddy-model-inheritance
Last synced: 21 days ago
JSON representation
A small demo on how to extend models in Geddy
- Host: GitHub
- URL: https://github.com/ben-ng/geddy-model-inheritance
- Owner: ben-ng
- Created: 2013-07-01T18:12:30.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-07-01T18:13:56.000Z (over 11 years ago)
- Last Synced: 2024-04-16T01:10:12.129Z (7 months ago)
- Language: JavaScript
- Size: 379 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
README
# Inheriting Models In Geddy
This is just a simple demonstration of how you can extend models in Geddy. The `Pizza` model has a `toppings` property, and inherits a `name` property from the `Item` model, which is in `app/helpers` as it doesn't need to be registered.
Just define all your properties and validations as per normal in the `app/helpers/item.js` constructor, and `.apply()` it in `app/models/pizza.js` to inherit those properties.