![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Stores floating point values in an integer database column.
Most useful for currency, fixed_point_field is a library that lets you tell your active record classes that some numeric column needs to be upscaled when saved and downscaled when loaded, by some known number of decimal places. It also generates stubs to directly access the fixed point version of the number, if you need to use mathematics and remain exact, you can multiply the fixed width version of your number by another integer and then down convert the result manually. The formula for this is: fixed_num.to_f / (base ** width)
class Product < ActiveRecord::Base fixed_point_field :price end
prod = Product.new(:price => 12.75) prod.price # => 12.75 prod.price_fixed # => 1275
prod.send(:read_attribute, :price) # => 1275
prod.price_fixed = 1999 prod.price # => 19.99
This library was designed to be used to store American currency (USD), but may be useful in other situations as well. To store a number with a fixed point width of 10, use:
fixed_point_field :very_precise_column, :width => 10
You can also store numbers in other bases other than decimal numbers, but any base that is not evenly divisible by 10 will give you rounding errors, negating the value of the plugin. I'm not sure why you'd need this, but here it is:
fixed_point_field :base_twenty_column, :base => 20
The preferred method of installation is through Rubygems. You can use config.gem, bundler, or manually install the fixed_point_field gem, depending on your version of Rails and desired usage.
FAQs
Unknown package
We found that fixed_point_field demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.