Ticket #76 (closed defect: fixed)
Rendering partials shouldn't print the layout
| Reported by: | zimbatm | Owned by: | why |
|---|---|---|---|
| Priority: | major | Milestone: | Camping 1.6 |
| Component: | bin/camping | Version: | |
| Keywords: | Cc: |
Description
When you use Ajax, you often want to return just a bunch of html without the layout.
What I propose is that partials won't be rendered with the layout. I also propose that the layout become a partial to make things easier and more logical.
def method_missing(*a,&b)
a.shift if a[0]==:render
m=markaby
s=m.capture{send(*a,&b)}
s=m.layout{s} if m.respond_to?:layout
"#{s}"
end
would become :
def method_missing(*a,&b)
a.shift if a[0]==:render
m=markaby
s=m.capture{send(*a,&b)}
if a[0][0] != _? and m.respond_to?:_layout
s=m._layout{s}
end
"#{s}"
end
Attachments
Change History
Note: See
TracTickets for help on using
tickets.
