Commit e17edc53 by liyijie

feat: 更改single 额外属性的位置

parent f568bf42
<%- if active_record? -%>
json.extract!(
<%= resource_singular %>,
*<%= resource_singular %>.class.try(:extra_permitted_attributes),
:id,
:created_at,
:updated_at,
<%- attributes_names.each do |attribute_name| -%>
:<%= attribute_name %>,
<%- end -%>
*<%= resource_singular %>.class.try(:extra_permitted_attributes),
)
<%- else -%>
json.merge! <%= resource_singular %>.as_json
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment