{"record":{"id":"a699ea0725e44a58","repo":"RubyMoney/money","slug":"can-t-call-currency-all-currency-currency-i","errorCode":null,"errorMessage":"Can't call Currency.all - currency '#{currency}' is missing the attribute 'priority'","messagePattern":"Can't call Currency\\.all - currency '#(.+?)' is missing the attribute 'priority'","errorType":"exception","errorClass":"Money::Currency::MissingAttributeError","httpStatus":null,"severity":"error","filePath":"lib/money/currency.rb","lineNumber":140,"sourceCode":"      # https://www.answers.com/redirectSearch?query=fractional-monetary-unit-subunit\n      #\n      # See https://en.wikipedia.org/wiki/List_of_circulating_currencies and\n      # https://metacpan.org/release/TNGUYEN/Locale-Currency-Format-1.28/view/Format.pm\n      def table\n        @table ||= Loader.load_currencies\n      end\n\n      # List the currencies imported and registered\n      # @return [Array]\n      #\n      # @example\n      #   Money::Currency.all()\n      #   [#<Currency ..USD>, 'CAD', 'EUR']...\n      def all\n        table.keys.map do |curr|\n          c = Currency.new(curr)\n          if c.priority.nil?\n            raise MissingAttributeError.new(:all, c.id, :priority)\n          end\n\n          c\n        end.sort_by(&:priority)\n      end\n\n      # We need a string-based validator before creating an unbounded number of\n      # symbols.\n      # http://www.randomhacks.net.s3-website-us-east-1.amazonaws.com/2007/01/20/13-ways-of-looking-at-a-ruby-symbol/#11\n      # https://github.com/RubyMoney/money/issues/132\n      #\n      # @return [Set]\n      def stringified_keys\n        @stringified_keys ||= stringify_keys\n      end\n\n      # Register a new currency\n      #","sourceCodeStart":122,"sourceCodeEnd":158,"githubUrl":"https://github.com/RubyMoney/money/blob/26e2829c34f165847040a5a40d4d2daa5eb72927/lib/money/currency.rb#L122-L158","documentation":"Error \"Can't call Currency.all - currency '#{currency}' is missing the attribute 'priority'\" thrown in RubyMoney/money.","triggerScenarios":"Thrown at lib/money/currency.rb:140 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"26e2829c34f165847040a5a40d4d2daa5eb72927","analyzedAt":"2026-08-23T17:41:07.306Z","schemaVersion":2},"datasetVersion":"2026-08-23T21:17:23.414Z"}