Nedomas / databound-rails

Ruby gem - Provides Javascript a simple API to the Ruby on Rails CRUD

Home Page:http://databound.me

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gem Bower npm Code Climate Build Status

Databound

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.

Usage

  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

About

Ruby gem - Provides Javascript a simple API to the Ruby on Rails CRUD

http://databound.me

License:MIT License


Languages

Language:Ruby 82.9%Language:JavaScript 8.6%Language:HTML 7.4%Language:CSS 1.0%