Skip to content

Commit

Permalink
Swap from Set to Array
Browse files Browse the repository at this point in the history
  • Loading branch information
CloCkWeRX committed Sep 25, 2022
1 parent e2097a2 commit afbe764
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/models/entities/account.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Account < ActiveRecord::Base
has_many :addresses, dependent: :destroy, as: :addressable, class_name: "Address" # advanced search uses this
has_many :emails, as: :mediator

serialize :subscribed_users, Set
serialize :subscribed_users, Array

accepts_nested_attributes_for :billing_address, allow_destroy: true, reject_if: proc { |attributes| Address.reject_address(attributes) }
accepts_nested_attributes_for :shipping_address, allow_destroy: true, reject_if: proc { |attributes| Address.reject_address(attributes) }
Expand Down
2 changes: 1 addition & 1 deletion app/models/entities/campaign.rb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Campaign < ActiveRecord::Base
has_many :opportunities, -> { order "id DESC" }, dependent: :destroy
has_many :emails, as: :mediator

serialize :subscribed_users, Set
serialize :subscribed_users, Array

scope :state, lambda { |filters|
where('status IN (?)' + (filters.delete('other') ? ' OR status IS NULL' : ''), filters)
Expand Down
2 changes: 1 addition & 1 deletion app/models/entities/contact.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class Contact < ActiveRecord::Base
has_ransackable_associations %w[account opportunities tags activities emails addresses comments tasks]
ransack_can_autocomplete

serialize :subscribed_users, Set
serialize :subscribed_users, Array

accepts_nested_attributes_for :business_address, allow_destroy: true, reject_if: proc { |attributes| Address.reject_address(attributes) }

Expand Down
2 changes: 1 addition & 1 deletion app/models/entities/lead.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class Lead < ActiveRecord::Base
has_many :addresses, dependent: :destroy, as: :addressable, class_name: "Address" # advanced search uses this
has_many :emails, as: :mediator

serialize :subscribed_users, Set
serialize :subscribed_users, Array

accepts_nested_attributes_for :business_address, allow_destroy: true, reject_if: proc { |attributes| Address.reject_address(attributes) }

Expand Down
2 changes: 1 addition & 1 deletion app/models/entities/opportunity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Opportunity < ActiveRecord::Base
has_many :tasks, as: :asset, dependent: :destroy # , :order => 'created_at DESC'
has_many :emails, as: :mediator

serialize :subscribed_users, Set
serialize :subscribed_users, Array

scope :state, lambda { |filters|
where('stage IN (?)' + (filters.delete('other') ? ' OR stage IS NULL' : ''), filters)
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/comment_extensions_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
end

class CommentableEntity < ActiveRecord::Base
serialize :subscribed_users, Set
serialize :subscribed_users, Array
acts_as_commentable
uses_comment_extensions
end
Expand Down

0 comments on commit afbe764

Please sign in to comment.