{"id":20947905,"url":"https://github.com/chip/rails_money","last_synced_at":"2026-03-15T09:46:29.306Z","repository":{"id":474009,"uuid":"99166","full_name":"chip/rails_money","owner":"chip","description":"This is merely a copy of the rails_money repo that was deleted.  I am not maintaining this repo, but have put it here for project use.  A handler for storing money in ActiveRecord objects as integers (as cents), but dealing with them as Money Objects.","archived":false,"fork":false,"pushed_at":"2008-12-31T23:08:23.000Z","size":84,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-19T22:15:36.520Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chip.png","metadata":{"files":{"readme":"README","changelog":null,"contributing":null,"funding":null,"license":"MIT-LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2008-12-31T23:00:25.000Z","updated_at":"2019-08-13T13:50:53.000Z","dependencies_parsed_at":"2022-07-16T14:47:22.753Z","dependency_job_id":null,"html_url":"https://github.com/chip/rails_money","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chip%2Frails_money","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chip%2Frails_money/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chip%2Frails_money/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chip%2Frails_money/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chip","download_url":"https://codeload.github.com/chip/rails_money/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243345570,"owners_count":20275869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-19T00:13:38.685Z","updated_at":"2025-12-26T09:23:08.146Z","avatar_url":"https://github.com/chip.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"= Rails Money\n\nNote! This is NOT compatible with the 'money' gem!\n\nA handler for storing money in ActiveRecord objects as integers (as cents), but dealing\nwith them as Money Objects.\n\n\nNote: Dividing a money object will return an array of Money objects. This ensures cents \ndo not go missing.\n\nFor example:\n\n  \u003e\u003e money = Money.new(10.00)\n  =\u003e #\u003cMoney:0xb76b3e14 @cents=1000\u003e \n  \u003e\u003e money / 3\n  =\u003e [#\u003cMoney:0xb76b3e14 @cents=433\u003e, #\u003cMoney:0xb76b3f2c @cents=333\u003e, #\u003cMoney:0xb76b3f04 @cents=333\u003e]\n\nAll other operations (+, -, *, and Comparable stuff) will work without any surprises or magic. \n\n\n== Installation\n\n./script/plugin install svn://svn.nullcreations.net/plugins/rails_money\n\n\n== Usage\n\nCreate your tables with fields named FIELDNAME_in_cents and you will be able to access them as\nFIELDNAME. ActiveRecord will return Money objects instead of Fixnums.\n\n  add_column :products, :price_in_cents, :integer\n \n  product = Product.find_first\n  product.price = 100.00\n  product.price \u003e\u003e #\u003cMoney @cents=10000\u003e\n\n\nCreating a Money can be done from a Fixnum (dollars) or a Float (dollars.cents). To create a money\nobject from just cents, do Money.create_from_cents(100) \n\n== Feedback\n\nAny suggestions, fixes, or improvements - lemme know, jerrett at gmail\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchip%2Frails_money","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchip%2Frails_money","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchip%2Frails_money/lists"}