mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-23 06:16:50 +00:00
Fix untested bug
This commit is contained in:
parent
378627212e
commit
da3802ee3c
@ -234,7 +234,7 @@ module AMS
|
|||||||
# end
|
# end
|
||||||
#
|
#
|
||||||
# def related_article_links
|
# def related_article_links
|
||||||
# related_link_to_one(:articles)
|
# related_link_to_one(related_article_id, :articles)
|
||||||
# end
|
# end
|
||||||
#
|
#
|
||||||
# def article
|
# def article
|
||||||
@ -256,7 +256,7 @@ module AMS
|
|||||||
# end
|
# end
|
||||||
#
|
#
|
||||||
# def related_article_links
|
# def related_article_links
|
||||||
# related_link_to_one(:articles)
|
# related_link_to_one(related_article_id, :articles)
|
||||||
# end
|
# end
|
||||||
#
|
#
|
||||||
# def article
|
# def article
|
||||||
@ -281,7 +281,7 @@ module AMS
|
|||||||
METHOD
|
METHOD
|
||||||
add_instance_method <<-METHOD
|
add_instance_method <<-METHOD
|
||||||
def related_#{relation_name}_links
|
def related_#{relation_name}_links
|
||||||
related_link_to_one("#{type}")
|
related_link_to_one(related_#{relation_name}_id, "#{type}")
|
||||||
end
|
end
|
||||||
METHOD
|
METHOD
|
||||||
add_instance_method <<-METHOD
|
add_instance_method <<-METHOD
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user