lib/pg_trunk/operations/rules/base.rb in pg_trunk-0.1.3 vs lib/pg_trunk/operations/rules/base.rb in pg_trunk-0.2.0
- old
+ new
@@ -21,10 +21,10 @@
validates :if_not_exists, absence: true
validates :table, :name, presence: true
validates :kind, inclusion: { in: %i[instead also] }, allow_nil: true
validates :event, inclusion: { in: %i[insert update delete] }, allow_nil: true
- # By default foreign keys are sorted by tables and names.
+ # By default rules are sorted by tables and names.
def <=>(other)
return unless other.is_a?(self.class)
result = table <=> other.table
result.zero? ? super : result