Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 668 Bytes

README.md

File metadata and controls

27 lines (19 loc) · 668 Bytes

Numeric Nation Input Gem for Rails 3.2

Build Status Gem Version

Info

Allow , and as decimal part delimiter for AR's float typecasting from string.

Installation

# Gemfile
gem "numeric_nation_input"

Usage

class TestModel < ActiveRecord::Base
  attr_accessible :attr1, :attr2

  numeric_nation_input :attr1, :attr2
end

model = TestModel.new(attr1: "1 025,45")
model.attr1 #=> 1025.45 (Float)