Commit dc31b2a3 by liyijie

feat: 更新生成的代码格式,string使用单引号

parent 0d7be6d6
json.partial! "<%= view_path %>/simple", <%= resource_singular %>: <%= resource_singular %> json.partial! '<%= view_path %>/simple', <%= resource_singular %>: <%= resource_singular %>
json.partial! "<%= view_path %>/single", <%= resource_singular %>: <%= resource_singular %> json.partial! '<%= view_path %>/single', <%= resource_singular %>: <%= resource_singular %>
<%- belongs_to_refs.each do |ref| -%> <%- belongs_to_refs.each do |ref| -%>
json.<%= ref.name.to_s %> <%= resource_singular %>.<%= ref.name.to_s %>, partial: '<%= File.join(ref.klass.name.underscore.pluralize, 'single') %>', as: :<%= ref.name %> json.<%= ref.name.to_s %> <%= resource_singular %>.<%= ref.name.to_s %>, partial: '<%= File.join(ref.klass.name.underscore.pluralize, 'single') %>', as: :<%= ref.name %>
......
json.partial! "detail", <%= resource_singular %>: @<%= resource_singular %> json.partial! 'detail', <%= resource_singular %>: @<%= resource_singular %>
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