number_field allow two decimal points rails code example
Example: rails float field model
Copyclass CreateFakes < ActiveRecord::Migration
def change
create_table :fakes do |t|
t.decimal :float_value, :precision => 4, :scale => 3
end
end
end