Problem rendering within a table

Hi, I seem to be having an issue with rendering a partial within a
table. Basically, I had a partial with all my

and tags that
was to be rendered inside the tags on my page. When it rendered,
all the tags were removed for some reason and just the text remained, so
it went outside my table. However, when I include the
tags
inside the partial, it renders everything just fine. I believe the
problem is with my acts_as_authenticated plugin, as I remember getting
an authentication error at one point. Does anyone know if that plugin
has a problem with inserting a partial into a table?

The other potential reason is I’m using scriptaculous and ajax for all
of these. I tried giving all my

's and even
's unique IDs but
that didnt work either. If anyone has a suggestion or has run into this
problem before I’d love to know. I just want to be able to update within
a table with ajax. Thanks!

On 16 Apr 2008, at 17:06, Mark Mr wrote:

an authentication error at one point. Does anyone know if that plugin
has a problem with inserting a partial into a table?

I can’t think why the two would conflict. Show us some code :-), and
eyeball the generated html closely.

Fred

Frederick C. wrote:

On 16 Apr 2008, at 17:06, Mark Mr wrote:

an authentication error at one point. Does anyone know if that plugin
has a problem with inserting a partial into a table?

I can’t think why the two would conflict. Show us some code :-), and
eyeball the generated html closely.

Fred

Ok, here’s the table where it’s supposed to be inserted:

#insert partial here
Description
<%=text_field_tag :description, '', :size => '13' %> <%= observe_field(:description, :frequency=>0.1, :update=>"hardware_list", :url=>{:action=>:get_description_list})%>

the controller function(get_description_list) runs some stuff and ends
up with:

render :partial => ‘index_search_by_desc’, :locals => { :hardwares =>
@hardwares }

then this is the partial it renders:

<% for hardware in hardwares %>

<%= link_to hardware.description, hardware %> <% end %>

the partial is renders and displays everything minus the table tags.

On Apr 16, 6:58 pm, Mark Mr [email protected] wrote:

#insert partial here

Having a div at the top level of a table like that is invalid html

Fred

On Apr 16, 9:35 pm, Mark Mr [email protected] wrote:

Having a div at the top level of a table like that is invalid html

Fred

yeah you’re right. I think that will solve my problem here, I’ve gotten
s couple things to work. I’ll just set a with the id instead of a
div. Thanks, i didnt know that!

You’re allowed multiple tbodys though, so you can do

static rows here
and insert your rows into that second tbody.

Fred

Frederick C. wrote:

On Apr 16, 6:58�pm, Mark Mr [email protected] wrote:

#insert partial here

Having a div at the top level of a table like that is invalid html

Fred

yeah you’re right. I think that will solve my problem here, I’ve gotten
s couple things to work. I’ll just set a

with the id instead of a
div. Thanks, i didnt know that!

Frederick C. wrote:

On Apr 16, 9:35�pm, Mark Mr [email protected] wrote:

Having a div at the top level of a table like that is invalid html

Fred

yeah you’re right. I think that will solve my problem here, I’ve gotten
s couple things to work. I’ll just set a with the id instead of a
div. Thanks, i didnt know that!

You’re allowed multiple tbodys though, so you can do

static rows here
and insert your rows into that second tbody.

Fred

Ah yeah that works too. that’ll sure be useful in the future. I really
appreciate the pointers there :slight_smile: now my ajax is working pretty good.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs