https://github.com/nedomas/databound-rails
Ruby gem - Provides Javascript a simple API to the Ruby on Rails CRUD
https://github.com/nedomas/databound-rails
Last synced: 26 days ago
JSON representation
Ruby gem - Provides Javascript a simple API to the Ruby on Rails CRUD
- Host: GitHub
- URL: https://github.com/nedomas/databound-rails
- Owner: Nedomas
- License: mit
- Created: 2014-10-22T20:16:41.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2020-12-28T09:24:29.000Z (over 4 years ago)
- Last Synced: 2025-04-18T18:33:26.119Z (about 1 month ago)
- Language: Ruby
- Homepage: http://databound.me
- Size: 104 KB
- Stars: 19
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[](https://rubygems.org/gems/databound)
[](http://bower.io/search/?q=databound)
[](https://www.npmjs.com/package/databound)
[](https://codeclimate.com/github/Nedomas/databound-rails)
[](https://travis-ci.org/Nedomas/databound-rails)
Provides Javascript a simple CRUD API to the Ruby on Rails backend.
This repo is for Ruby on Rails backend part of Databound.
**You can also check out the javascript** [Databound repo](https://github.com/Nedomas/databound).
## Usage
```js
User = new Databound('/users')User.where({ name: 'John' }).then(function(users) {
alert('Users called John');
});User.find(15).then(function(user) {
alert('User no. 15: ' + user.name);
});User.create({ name: 'Peter' }).then(function(user) {
alert('I am ' + user.name + ' from database');
});
```[All API docs](http://nedomas.github.io/databound/src/databound.html)