We're supposed to use yield instead of @content_for_layout, but I can't get yield to work in a Markaby template: yield text yield Either one of these lines results in a 'no block given' error (but 'text @content_for_layout' works). Anybody know how to use yield instead? Thanks, Joe
on 09.08.2006 01:02
on 03.04.2007 16:20
Joe Ruby wrote: > We're supposed to use yield instead of @content_for_layout, but I can't > get yield to work in a Markaby template: > > yield > > text yield > > Either one of these lines results in a 'no block given' error (but 'text > @content_for_layout' works). Anybody know how to use yield instead? > > Thanks, > Joe Use content_for_layout method.
on 04.04.2007 15:57
I use yield all the time: <%= yield %> I'm on Rails 1.2.3 and Ruby 1.8.5 -- maybe your version is the issue (as I recall, 'yield' is the newer, preferred method). ...jon On Apr 3, 7:20 am, Ilya Novoselov <rails-mailing-l...@andreas-s.net>