开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜