Forum: Ruby on Rails A waste of rhtml

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
224b787861d66cc06fa539df14672763?d=identicon&s=25 Eddie Son (deezzer)
on 2007-02-14 20:38
Hi.

with an RJS, if you have just a one liner, instead of making an rjs page
for it, you'd do render :update do |page|...

but what about rhtml pages? I just have a dinky <%= render :partial =>
%> in there..
456f5e099eb136439d751598e32d8607?d=identicon&s=25 Bill Siggelkow (Guest)
on 2007-02-14 21:27
(Received via mailing list)
Just use something like ...
render (:inline => %{<h2>Hello Ruby</h2>})

Bill Siggelkow
http://www.jadecove.com

On Feb 14, 2:38 pm, Dominic Son <rails-mailing-l...@andreas-s.net>
Fb23bc8cd4030c526b0689276b34c8bd?d=identicon&s=25 Bryan Duxbury (bryanduxbury)
on 2007-02-14 22:07
Dominic Son wrote:
> Hi.
>
> with an RJS, if you have just a one liner, instead of making an rjs page
> for it, you'd do render :update do |page|...
>
> but what about rhtml pages? I just have a dinky <%= render :partial =>
> %> in there..

Have you tried using

render :partial => "somepartial"

in your action? I think that'll do it.

-Bryan
224b787861d66cc06fa539df14672763?d=identicon&s=25 Eddie Son (deezzer)
on 2007-02-14 23:44
Hey guys, you were both right. i just forgot the silly :layout=> true at
the end..

thanks

Bryan Duxbury wrote:
> Dominic Son wrote:
>> Hi.
>>
>> with an RJS, if you have just a one liner, instead of making an rjs page
>> for it, you'd do render :update do |page|...
>>
>> but what about rhtml pages? I just have a dinky <%= render :partial =>
>> %> in there..
>
> Have you tried using
>
> render :partial => "somepartial"
>
> in your action? I think that'll do it.
>
> -Bryan
This topic is locked and can not be replied to.