On Thu, Feb 16, 2012 at 6:22 PM, Naira Kobo
<lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:
> Hi all,
>
> I am trying to render a partial template but it is not been rendered.
>
What _is_ being rendered then if it is not the partial template?
I have asked a further question further down this mail.
>
>
> listing for traces.html.erb
>
> <div class="row">
> <div class="four columns">
> <nav>
> <ul class="list group">
> <% @all_traces.each do |trace| %>
> <li>
> <a href="<%>
traces_by_orig_exchange_id_path(trace.original_request_id) %>">
> <h6>
> <%= trace.headers%>
> </h6>
> <%= trace.original_request_id %></a></li>
> </li>
> <% end %>
> </ul>
> </nav>
> </div>
>
> <div>
> <%= render :partial =>
''traces_by_original_exchanges'', :collection
> => @traces_by_original_exchanges, :as => :trace %>
> </div>
>
> </div>
>
>
> listing _traces_by_original_exchanges.html.erb
> <tr>
> <td><%= link_to trace.exchange_id,
> trace_by_trace_id_path(trace.trace_id) %></td>
> </tr>
>
>
>
> listing my_controller.rb
>
> def list_traces_by_original_exchange_ids
> @tbl_trace = TblTrace.new
> @traces_by_original_exchanges >
>
@tbl_trace.list_traces_by_original_exchange_ids(params[:original_exchange_id])
>
> respond_to do |format|
> #format.html # show.html.erb
> format.html { redirect_to traces_url}
>
I am confused about this. If the format.html is a redirect_to, I am not sure
how anything is rendered at all (but I did not look in full detail in your
code).
> format.js
> format.json { render :json => @traces_by_original_exchanges }
> end
> end
>
>
> listing route.rb
> match ''esb'' => ''esb#index''
> match ''esb/index'' => ''esb#index'',
:as => :esb_home
> match ''esb/traces'' => ''esb#traces'',
:as => :traces
> match
''esb/list_traces_by_original_exchange_ids/:original_exchange_id''
> => ''esb#list_traces_by_original_exchange_ids'', :as
=>
> :traces_by_orig_exchange_id
>
>
> My resulting html page always shows:
> <div class="row">
> <div class="four columns">
> <nav>
> <ul class="list group">
> <li>
> <a
>
>
href="/esb/list_traces_by_original_exchange_ids/ID-swordfish-27243-1327514975752-13-85879">
> <h6>
> DDService
> </h6>
> ID-swordfish-27243-1327514975752-13-85879</a></li>
> </li>
> </ul>
> </nav>
> </div>
>
> <div>
> <!-- partial expected to display here -->
> </div>
>
> </div>
>
HTH,
Peter
--
*** Available for a new project ***
Peter Vandenabeele
http://twitter.com/peter_v
http://rails.vandenabeele.com
http://coderwall.com/peter_v
--
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.