On 6/8/07, Mike <mike.cahill-Wuw85uim5zDR7s880joybQ@public.gmane.org>
wrote:>
> I''m new to Rails - still trying to figure out the cleanest place
to
> put things.
>
> I wrote my own in-place-editor that gives me a bit more support for
> things like lists. Works fine, but it requires that every item in the
> list be rendered wrapped in a <span> with the item''s object
id.
>
> i''ve been using render :update :partial :collection, and putting
the
> <span>s explicitly in the partial view. but that''s ugly.
it requires
> that whenever i reuse this mechanism, i have to know how it works.
> i''d rather be able to write the partial view without the
<span> and
> have it added in.
>
> but how? i could use a layout, i suppose, in the render. but then i
> have to be sure the layout is there and named the right thing.
>
> i tried things like render :update :collection :inline, to wrap the
> view, but that doesn''t work and seems ugly.
>
> so - what''s the right idiomatic way to do this in Rails? suck it
up
> and remember the layout file? create the layout file from the lib
> file that provides the in-list-editor capability? do something else?
>
> opinions welcome. thx.
>
I think what you are asking is covered in this episode of rails cast.
http://railscasts.com/episodes/40
--
Edward Grant
themasternone-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
-~----------~----~----~----~------~----~------~--~---