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 2006-08-09 01:02
on 2007-04-03 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 2007-04-04 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>
Please log in before posting. Registration is free and takes only a minute.
Existing account
(Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
Log in with Google account | Log in with Yahoo account
No account? Register here.