Project

freeskimer

0.0
No commit activity in last 3 years
No release in over 3 years
Save and retrieves objects from a database with no schema.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

 Project Readme

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.