Skip to content

Commit

Permalink
TTPLAT-497 fix transam asset association which should be polymorphic …
Browse files Browse the repository at this point in the history
…when associations defined on various classes
  • Loading branch information
mathmerized committed Oct 29, 2018
1 parent c363a45 commit 2fb3a63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/transam_accounting/transam_valuable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ module TransamValuable

has_many :depreciation_entries, :foreign_key => :transam_asset_id

has_many :book_value_updates, -> {where :asset_event_type_id => BookValueUpdateEvent.asset_event_type.id }, :class_name => "BookValueUpdateEvent", :foreign_key => :transam_asset_id
has_many :book_value_updates, -> {where :asset_event_type_id => BookValueUpdateEvent.asset_event_type.id }, :class_name => "BookValueUpdateEvent", :as => Rails.application.config.asset_base_class_name.underscore.to_sym

has_and_belongs_to_many :expenditures, :join_table => :assets_expenditures, :foreign_key => :transam_asset_id

Expand Down

0 comments on commit 2fb3a63

Please sign in to comment.