search for: article_body

Displaying 2 results from an estimated 2 matches for "article_body".

2007 Mar 25
5
Insert text into text area field with RJS
Hi, I''d like to insert/append some default text into a text area after clicking on an image button ''test.png'' in edit.rhtml: <%= link_to image_tag("test.png"), url => { :action => :new_text } %> Action: # article_body is the textarea''s id. def new_text render :update do |page| page.insert_html :bottom, :article_body, "text\n" end end Not surprisingly insert_html doesn''t work properly in this innerHTML context. But how it is possible to append text to existing one? page[:art...
2006 Jun 30
5
If / Else Form layout question.
...;if action => new'' or ''if action => edit'' statement? Thanks. <p><label for="article_title">Title</label><br/> <%= text_field ''article'', ''title'' %></p> <p><label for="article_body">Body</label><br/> <%= text_area ''article'', ''body'' %></p> <p><label for="article_author">Author</label><br/> <%= if ?????? #if new record page, insert the logged in users name text_field...