lib/rating/models/rating/rate.rb in rating-0.4.0 vs lib/rating/models/rating/rate.rb in rating-0.5.0
- old
+ new
@@ -1,9 +1,10 @@
# frozen_string_literal: true
module Rating
class Rate < ActiveRecord::Base
- self.table_name = 'rating_rates'
+ self.table_name_prefix = 'rating_'
+ self.table_name = ::Rating::Config.rate_table
after_save :update_rating
belongs_to :author, polymorphic: true
belongs_to :resource, polymorphic: true