1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-05 05:25:24 +02:00

Handle case sensitive values when creating securities
Some checks are pending
Publish Docker image / ci (push) Waiting to run
Publish Docker image / Build docker image (push) Blocked by required conditions

This commit is contained in:
Zach Gollwitzer 2025-05-08 14:31:43 -04:00
parent 867318cbc1
commit d8e058d7c6
4 changed files with 49 additions and 8 deletions

View file

@ -1,7 +1,7 @@
class Security < ApplicationRecord
include Provided
before_save :upcase_ticker
before_validation :upcase_symbols
has_many :trades, dependent: :nullify, class_name: "Trade"
has_many :prices, dependent: :destroy
@ -29,8 +29,8 @@ class Security < ApplicationRecord
end
private
def upcase_ticker
def upcase_symbols
self.ticker = ticker.upcase
self.exchange_operating_mic = exchange_operating_mic.upcase if exchange_operating_mic.present?
end
end