Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 2 months 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 (about 10 years ago)
- Default Branch: master
- Last Pushed: 2020-12-28T09:24:29.000Z (about 4 years ago)
- Last Synced: 2024-11-02T00:42:08.592Z (about 2 months ago)
- Language: Ruby
- Homepage: http://databound.me
- Size: 104 KB
- Stars: 19
- Watchers: 4
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
[![Gem](https://img.shields.io/gem/v/databound.svg?style=flat-square)](https://rubygems.org/gems/databound)
[![Bower](https://img.shields.io/bower/v/databound.svg?style=flat-square)](http://bower.io/search/?q=databound)
[![npm](https://img.shields.io/npm/v/databound.svg?style=flat-square)](https://www.npmjs.com/package/databound)
[![Code Climate](http://img.shields.io/codeclimate/github/Nedomas/databound-rails.svg?style=flat-square)](https://codeclimate.com/github/Nedomas/databound-rails)
[![Build Status](http://img.shields.io/travis/Nedomas/databound-rails.svg?style=flat-square)](https://travis-ci.org/Nedomas/databound-rails)![Databound](https://cloud.githubusercontent.com/assets/1877286/4743542/df89dcec-5a28-11e4-9114-6f383fe269cb.png)
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)