lib/superstore/associations.rb in superstore-2.5.0 vs lib/superstore/associations.rb in superstore-3.0.0

- old
+ new

@@ -16,26 +16,26 @@ # Example: # class Driver < Superstore::Base # end # class Truck < Superstore::Base # end - def belongs_to(name, options = {}) + def belongs_to(name, **options) if options.delete(:superstore) Superstore::Associations::Builder::BelongsTo.build(self, name, options) else super end end - def has_many(name, options = {}) + def has_many(name, **options) if options.delete(:superstore) Superstore::Associations::Builder::HasMany.build(self, name, options) else super end end - def has_one(name, options = {}) + def has_one(name, **options) if options.delete(:superstore) Superstore::Associations::Builder::HasOne.build(self, name, options) else super end