13 Apr 2007, 5:47pm
/dev/rails
by chris

Comments Off

in_place_editor_field as a textarea

You want to use in-place editing but you've got a large amount of text and the default textfield created by in_place_editor_field just isn't large enough? Set the rows property:

RUBY:
  1. <%= @activity_item_note = note; in_place_editor_field :activity_item_note, :note, {}, :url => { :controller => 'activity_item_note', :action => 'set_note_text', :id => note.id }, :rows => 4 %>

When the rows property is set to any value greater than 1, in_place_editor_field renders a textarea instead of a textfield.