Re: Trying to create a "view object" with yield self

Pry Flack
2013-06-07T21:31:01Z

Berlimioz wrote in post #1111637:
> Hi pry_f !
>
> Sorry but I''m not sure to have exactly understood what
you''re trying to
> do.
> What I understand from the code you made available is that the lines
> below
> should display something like
>
> opening
> elem1: parent is my-parent
> elem2: parent is my-parent
> closing
>
> and it doesn''t ?
>
> Le jeudi 6 juin 2013 19:48:46 UTC+2, Ruby-Forum.com User a crit :

That''s right. This is not a model related problem. I''m trying
to make view "widgets" basically.
I created another gist. This time it''s just a ruby script demonstrating
the concept by printing to standard out.
https://gist.github.com/PryFlack/5732422

I have a little bug as mentioned in the comment. I was pretty sure this
was going to work in plain ruby. Anyways with rails I''ve had trouble
implementing this idea even more. I don''t see how I could use partials
for that so the only thing I can think of is what I''m doing here.
Thanks
for your feedback and interest !

--
Posted via http://www.ruby-forum.com/.

--
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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit