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.
Eddie S. (Guest)
on 2007-02-14 21: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..
Bill S. (Guest)
on 2007-02-14 22:27
(Received via mailing list)
Just use something like ...
render (:inline => %{<h2>Hello Ruby</h2>})

Bill S.
http://www.jadecove.com

On Feb 14, 2:38 pm, Dominic S. <removed_email_address@domain.invalid>
Bryan D. (Guest)
on 2007-02-14 23:07
Dominic S. 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
Eddie S. (Guest)
on 2007-02-15 00:44
Hey guys, you were both right. i just forgot the silly :layout=> true at
the end..

thanks

Bryan D. wrote:
> Dominic S. 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.