David Rose
2008-Apr-22 18:06 UTC
Re: unpopulated in_place_editor_field not working [UPDATED] Easier, cleaner workaround!
I''m running Rails 2.2, and have spent waaaay too long unsuccessfully trying to get the suggestion at http://www.akuaku.org/archives/2006/08/in_place_editor_1.shtml to work for me. I also considered trying a few other suggestions I found, but they all felt kludgy. Then a CSS lightbulb went off over my head! I added this to the top of the template where I needed a bunch of these blank in_place_editor_fields to work: <style type="text/css" media="screen"> .in_place_editor_field:after { content: url(/images/edit_entry_12.png) } </style> WOOOHOOO! It totally works, and doesn''t look too gross. David Rose On Mon, Jan 22, 2007 at 9:34 PM, Cynthia Kiser <cynthia.kiser-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > More searching turned up a post to this list referencing: > http://www.akuaku.org/archives/2006/08/in_place_editor_1.shtml > > > I dropped it in, restarted my server, and then started using it. For > other newbies, that involved changing the controller line to add the > :empty_text parameter: > in_place_edit_for :page, :comments, :empty_text => ''(add comment)'' > And changing my invocation of in_place_editor_field to include the > in_place_editor_options hash: > <%= in_place_editor_field :page, :comments, {}, { > :nil_content_replacement => ''(add comment)'' } %> > > > > -- > Cynthia Kiser > cynthia.kiser-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---