【发布时间】:2020-05-07 19:08:38
【问题描述】:
我有一个模型订单和用户。
user - has_many: order
order - belongs_to: user
我想检查一下订单。
<% if current_user%>
form where the name of the order form will be recorded from the user
<% else%>
regular order creation form
<% end%>
任务是如何将另一个模型的数据写入模型?
【问题讨论】:
标签: ruby-on-rails ruby model-view-controller ruby-on-rails-5 ruby-on-rails-6