基于Ruby on Rails的JavaScript简单的 CRUD API
jopen
10年前
Databound提供以Ruby on Rails为后端的JavaScript简单的 CRUD API 。
在线示例: databound.me.
用法:
User = new Databound('/users') User.where({ name: 'John' }).then(function(users) { alert('Users called John'); }); User.find(15).then(function(user) { print('User no. 15: ' + user.name); }); User.create({ name: 'Peter' }).then(function(user) { print('I am ' + user.name + ' from database'); });
版本支持和依赖
Works with:
- Ruby on Rails 3+
- Ruby 2.0+
- It can work with Angular as a better ngResource alternative
- ActiveRecord or Mongoid
- Works with Active Model Serializers
- Chrome any, Firefox any, Opera any, IE 8+
Depends on:
- Lodash (should work with any version)