mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-22 22:06:50 +00:00
Remove newly-redundant OrderedSet
This commit is contained in:
parent
ee3cec3d0c
commit
c767d7f5e4
@ -1,25 +0,0 @@
|
||||
module ActiveModel
|
||||
class OrderedSet
|
||||
def initialize(array)
|
||||
@array = array
|
||||
@hash = {}
|
||||
|
||||
array.each do |item|
|
||||
@hash[item] = true
|
||||
end
|
||||
end
|
||||
|
||||
def merge!(other)
|
||||
other.each do |item|
|
||||
next if @hash.key?(item)
|
||||
|
||||
@hash[item] = true
|
||||
@array.push item
|
||||
end
|
||||
end
|
||||
|
||||
def to_a
|
||||
@array
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -1,6 +1,5 @@
|
||||
require "active_support/core_ext/class/attribute"
|
||||
require "active_support/core_ext/module/anonymous"
|
||||
require "set"
|
||||
|
||||
module ActiveModel
|
||||
# Active Model Serializer
|
||||
|
||||
@ -2,7 +2,6 @@ require "active_support"
|
||||
require "active_support/core_ext/string/inflections"
|
||||
require "active_support/notifications"
|
||||
require "active_model"
|
||||
require "active_model/ordered_set"
|
||||
require "active_model/array_serializer"
|
||||
require "active_model/serializer"
|
||||
require "active_model/serializer/associations"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user