0.0
No commit activity in last 3 years
No release in over 3 years
A gem for making fields that need partial value assignments easier
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.0.0
>= 0
~> 2.0.0

Runtime

 Project Readme

AssignByParts

Usage

Just a way to clean up our normal way of having multiple input fields for phone numbers, or social security numbers.

assign_by_parts :social_security_number, :area => [0, 2],
                                         :group => [3..4],
                                         :serial => [5..8]

In your views you would have something like:

= form.input :social_security_number_area
= form.input :social_security_number_group
= form.input :social_security_number_serial

Installation

To install into a Rails 3 app just add this to your Gemfile:

gem "assign_by_parts"

Enjoy!