Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A ruby gem for saving objects in json format into the database with no schema.
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.gitignore
Gemfile
LICENSE
README.md
Rakefile
freeskimer.gemspec

README.md

Freeskimer

Saves and retrieves model attributes to your database with no schema. It simply serializes the object to JSON at save time and desirializes it upon retrieval.

Installation

Add this line to your application's Gemfile:

  gem 'freeskimer'

And then execute:

$ bundle

Usage

Call freeskim in an ActiveRecord class and pass the name of the attribute you wish to save and the name of the column where it should be saved (has to be a string type).

class Key < ActiveRecord::Base
  freeskim :name ,    to: :user_attributes
  freeskim :email,    to: :user_attributes
  freeskim :address,  to: :user_attributes
end

This will automatically save the attributes 'name' and 'email' and 'address' in json format in the 'user_attributes' column.

Development

Questions or problems? Please post them on the issue tracker. You can contribute changes by forking the project and submitting a pull request. You can ensure the tests passing by running bundle and rake.

This gem is created by André Barbosa and is under the MIT License.

Something went wrong with that request. Please try again.