On 4 June 2015 at 11:10, Euan Leslie <li...@ruby-forum.com> wrote: > This could possibly be a really stupid question, but I have a home page > which calls a partial to show the latest entry in a table called 'news'. > All I want to know is how to put the 'news.content' into a text box. > Partial is as follows: > > <p> > <strong>Title:</strong> > <%= news.title %> > > </p> > > <p> > <strong>Details:</strong> > <%= news.content %> > </p> > > > The bit that calls this on my home page is as such: > > <%= render partial: 'news/news', locals: { news: News.last } %>.
Do you mean that what you have works, but you want it in a text field instead of a paragraph? If so then one has to ask the question why? One would normally use a text_field inside a form. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscr...@googlegroups.com. To post to this group, send email to rubyonrails-talk@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/CAL%3D0gLurC-4Oaf47haFd%3Dm%2BV3YoCLE0RD4msWXTRJUr00u73Wg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.