class FinancialReport < ActiveRecord::Base
  has_one :organisation
end

class FinancialReport < ActiveRecord::Base
  belongs_to :organisation
  validates_associated :organisation

  validates :year, presence: true, uniqueness: {scope: :organisation_id}, numericality: {only_integer: true}
  # We allow nil because data suggests some organisations are missing some data, 0 would be inaccurate in these cases
  validates :spending, numericality: {only_integer: true}, allow_nil: true
  validates :funding, numericality: {only_integer: true}, allow_nil: true
  
end

Add validation for Financial Reports
Add validation for Financial Reports

Prepare for users inputting data rather than script
Change from has_one to the correct belongs_to
Check for numerical values in year,spending, funding
