Findable
Redis wrapper with API like ActiveRecord. (While creating...)
Installation
Add this line to your application's Gemfile:
gem "findable"
And then execute:
$ bundle
Usage
class Company < ActiveRecord::Base
has_many :person
end
class Person < Findable::Base
fields :name, :email, :gender, :company_id
belongs_to :company
end
person = Person.new(name: "Ken Iiboshi", gender: "male")
person.email = "[email protected]"
person.save
people = Person.where(gender: "male")
people.each do |person|
puts person.name
end
Contributing
- Fork it ( https://github.com/i2bskn/findable/fork )
- 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 a new Pull Request