mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-25 15:23:06 +00:00
tests for namespaced controlleler
This commit is contained in:
@@ -39,7 +39,7 @@ module ActiveModel
|
||||
|
||||
def serializable_object
|
||||
@object.map do |item|
|
||||
serializer_for(item).serializable_object
|
||||
serializer_for(item).serializable_object_with_notification
|
||||
end
|
||||
end
|
||||
alias_method :serializable_array, :serializable_object
|
||||
|
||||
@@ -12,6 +12,12 @@ module ActiveModel
|
||||
end
|
||||
end
|
||||
|
||||
def serializable_object_with_notification
|
||||
instrument('!serialize') do
|
||||
serializable_object
|
||||
end
|
||||
end
|
||||
|
||||
def serializable_data
|
||||
embedded_in_root_associations.tap do |hash|
|
||||
if respond_to?(:meta) && meta
|
||||
|
||||
Reference in New Issue
Block a user