Faat

Join the chat at https://gitter.im/xo8bit/faat Gem Version Code Climate Test Coverage Build Status

Welcome to faat gem!

Installation

Add this line to your application's Gemfile:

gem 'faat'

And then execute:

$ bundle

Or install it yourself as:

$ gem install faat

Usage

Run rails generate faat:resources {model_name}, generator will create folder resource in app directory, and file {model_name}_resource.rb

Initialize:

@post = Post.new
@post_resource = PostResource.new(@post)

Usage:

@post_resource.destroy  => destroy @post
@post_resource.update   => update @post

PostResource.last     => Post.last
PostResource.all      => Post.all
PostResource.where(title: "First Test Title") => Post.where(...)

TODO

Add resource and form generators

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/xo8bit/faat. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The gem is available as open source under the terms of the MIT License.