Update building.rb

has_many :users, :through => :fields

 def naklady_stavba_solary
    self.sum_bonus * self.solar_cost * Constant.ksv * self.exp_tech
  end
  
  def naklady_stavba_material
    self.sum_bonus * self.material_cost * Constant.kmav * self.exp_tech
  end