Sulu is an ORM library that maps REST-style resources to Ruby objects. It is designed to build applications backed by RESTful APIs instead of databases.
Add this to your Gemfile
bundle install. You're done!
First, you need to configure Sulu's connection to your API. In Rails, you could add this as an initializer in
Sulu.configure url: "https://api.yoursite.com" do |sulu| sulu.use Faraday::Request::UrlEncoded sulu.use Sulu::Middleware::ParseJSON sulu.use Faraday::Adapter::NetHttp end
A Sulu model is a Ruby class that extends
Sulu::Resource::Base. Define attributes using the
class Person < Sulu::Resource::Base attribute :name attribute :birthday attribute :gender end
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Add some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request