Check out example codes for "rails float field model". It will help you in understanding the concepts better.

Code Example 1

Copyclass CreateFakes < ActiveRecord::Migration
  def change
    create_table :fakes do |t|
      t.decimal :float_value, :precision => 4, :scale => 3
    end
  end
end

Learn ReactJs, React Native from akashmittal.com