Okay, I made a really dumb mistake and put:
<% javascript_include_tag 'defaults' %>
Instead of:
<% javascript_include_tag :defaults %>
So that fixed my rendering. At least I'm getting information over to the
other column now. But it's an error, because it can't find the ID. I
attached the screenshot of the error I'm seeing. The following will be
the code I currently have pertaining to this function. If anyone has any
ideas on why it's throwing that error, I would really appreciate it (I
know I'm missing something small here).
Here is my Show action in the Controller:
def show
@order = Order.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.xml { render :xml => @order }
end
end
----
Here's the sections I have in my index.html.erb file:
<% @orders.each do |order| %>
<tr>
<td><%=h order.id %></td>
<td><%=h order.name %></td>
<td><%= link_to_remote "Show", :url => {:controller =>
'orders', :action => 'show'}, :update => "order_div", :method => 'get'
%></td>
</tr>
<% end %>
--
<div id="order_div">
</div>
----
Here is the info in the _order_show.html.erb partial:
<p>
<b>Name:</b>
<%=h @order.name %>
</p>
<p>
<b>Address:</b>
<%=h @order.address %>
</p>
<p>
<b>City:</b>
<%=h @order.city %>
</p>
<p>
<b>State:</b>
<%=h @order.state %>
</p>
<p>
<b>Zip:</b>
<%=h @order.zip %>
</p>
.....ETC
Attachments:
http://www.ruby-forum.com/attachment/4747/ScreenShot004.jpg
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.