开发者

How can I use edit_in_place in the show of a different model in Rails?

开发者 https://www.devze.com 2022-12-30 03:57 出处:网络
I have a model Campaign and the campaign/show goes through a loop of the Emails.Campaign has_many Emails.

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).


I will need to try again, don't seem to be getting any responses.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号