# Errore parsing dentro a un render

**URL:** <https://www.ruby-forum.com/t/errore-parsing-dentro-a-un-render/71850>\
**Category:** IT\
**Created:** [October 11, 2006, 8:56pm UTC](https://www.ruby-forum.com/t/errore-parsing-dentro-a-un-render/71850 "2006-10-11T20:56:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![stb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e68b1a/32.png) [@stb](https://www.ruby-forum.com/u/stb)\
**Post date:** [October 11, 2006, 8:56pm UTC](https://www.ruby-forum.com/t/errore-parsing-dentro-a-un-render/71850/1 "2006-10-11T20:56:40Z")

</div>

Ciao,

ho un problema di parsing nella callback loaded del link to remote,  
precisamente non riesco a fargli prendere n, ho provato non so quante  
combinazioni e anche quanto non mi da errore non funziona.

questa è la riga: :loaded =\> ‘(#{session[:myTravel].locations  
[“n”.to\_i].place})’  
ho anche provato a scriverla  
così::loaded =\> ‘(#{session[:myTravel].locations[n].place})’  
:loaded =\> ‘(#{@place.place})’ (@place l’ho creata apposta per questo)  
:loaded =\> ‘(@place.place)’ (non so la sintassi 😛 )

codice intero(da notare che sono dentro un render e uso già i doppi  
apici):  
render :inline =\> "Insert TRAVEL info (STEP 2)

  

  
\<% session[:myTravel].counter.times do |n| %\>  
\<% @place = session[:myTravel].locations  
[n].place %\>  
\<%= session[:myTravel].locations[n].seq+1 %\> -  
\<%= session[:myTravel].locations[n].place %\>, \<%= session  
[:myTravel].locations[n].departure %\>  
\<%= link\_to\_remote( ‘edit’,  
:update =\> ‘subBox1’,  
:url =\>{ :action  
=\> :edit\_location\_on\_map, :seq =\> n },  
:loaded =\> ‘(#{session  
[:myTravel].locations[“n”.to\_i].place})’) %\>  
  
\<% end %\>

```
                   <%= form_remote_tag(:url => { :action

```

=\> :new\_travel\_step3 }, :update =\> ‘subBox1’) %\>  
  
  
nome viaggio:  
  
\<%= text\_field(‘travel’,‘name’,‘value’  
=\> ‘il mio viaggio’) %\>  
  
  
  
scopo:  
\<%= select\_tag(‘goal’,options\_for\_select  
([‘vacanza’,‘studio’,‘lavoro’,‘volontariato’],‘vacanza’)) %\>  
  
mezzo:  
\<%= select\_tag  
(‘transport’,options\_for\_select  
([‘macchina’,‘nave’,‘aereo’,‘treno’,‘moto’,‘bus’],‘treno’)) %\>  
  
vuoi offrire un passaggio?  
\<%= check\_box\_tag(‘ride’,‘1’,false) %\>  
  
  
descrizione:  
  
\<%= text\_area  
(‘travel’,‘description’,‘cols’ =\> 30,‘rows’ =\> 7,‘value’ =\>  
‘description…’) %\>

```
                    <% session[:myTravel].counter.times do |n| %>
                         <%= hidden_field

```

(‘location’+n.to\_s,‘latitude’,{‘size’ =\> 20}) %\>  
\<%= hidden\_field  
(‘location’+n.to\_s,‘longitude’,{‘size’ =\> 20}) %\>  
\<%= hidden\_field  
(‘location’+n.to\_s,‘country’,{‘size’ =\> 10}) %\>  
\<%= hidden\_field  
(‘location’+n.to\_s,‘accuracy’,{‘size’ =\> 10}) %\>

```
                   <% end %>

                   <%= submit_tag('>STEP 3') %>
                   <% end_form_tag %>"

```

Saluti Andrea\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_  
Ml mailing list  
removed\_email\_address@domain.invalid  
[http://lists.ruby-it.org/mailman/listinfo/ml](http://lists.ruby-it.org/mailman/listinfo/ml)
