如何在 Rails 中显示不同模型时使用 edit_in_place ?
我有一个模型活动,活动/节目会经历电子邮件循环。活动有_很多电子邮件。
<h2>Emails to Send Today</h2>
<% for email in @campaign.emails %>
<p><strong>Email: </strong><%= link_to email.title, email_path(email) %> sent after
<%= distance_of_time_in_words(email.days.days) %></p>
<% end %>
我希望能够在活动/显示页面中就地编辑主题和/或 email.days 值。
我该怎么做? (增加了复杂性,这些是可点击的链接)。
I have a model Campaign and the campaign/show goes through a loop of the Emails. Campaign has_many Emails.
<h2>Emails to Send Today</h2>
<% for email in @campaign.emails %>
<p><strong>Email: </strong><%= link_to email.title, email_path(email) %> sent after
<%= distance_of_time_in_words(email.days.days) %></p>
<% end %>
I would like to be able to edit in place the subject and/or the email.days value from the Campaign/show page.
How do I do that? (Added complexity, these are clickable links).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我需要再试一次,似乎没有得到任何回应。
I will need to try again, don't seem to be getting any responses.