Skip to content

About

Numeric nation input gem - from "1 000,123" to "1000.123"

Resources

Stars

0 stars

Watchers

3 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

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)

About

Numeric nation input gem - from "1 000,123" to "1000.123"

Resources

Stars

0 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages