Project

expansion

0.0
No commit activity in last 3 years
No release in over 3 years
Dynamic model attributes
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

Expansion

Expansion is intended to allow the dynamic addition of fields to a given model.

Installation

In your Gemfile, add the following dependency:

gem 'expansion'

Run:

$ bundle install

Run the generator:

$ rails g expansion:install

And then run:

$ rake db:migrate

Usage

To your expandable models, add the following function:

expandable

Your model will then have the following class function:

  • expandable_attributes

And the following instance methods:

  • expandable_attributes
  • expandable_values