hi david!

David A. Black [2011-07-20 15:24]:
>   <esi:vars>
>   <% state = "$(GEO{'region_code'})" %>
>   <% city = "$(GEO{'city'})" %>
> 
>   State: <%= state %><br/>            # CT
>   City: <%= city %><br/>                # NEWHAVEN
> 
>   Massaged city: <%= CITIES[state][city] %>    # Uses the literal EIS
> strings
> 
>   </esi:vars>
well, as far as ruby/erb is concerned there is no ESI, right? it
simply produces:

  <esi:vars>

  State: $(GEO{'region_code'})
  City: $(GEO{'city'})

  Massaged city:
whatever-the-value-of-CITIES["$(GEO{'region_code'})"]["$(GEO{'city'})"]-is

  </esi:vars>

the hash lookup occurs before ESI gets any chance to replace the
variables. so i don't think there's any way to achieve what you want
(other than going back to the server by some means after ESI
processing has happened). i'm totally unfamiliar with ESI, though,
so i might be off.

cheers
jens

-- 
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@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to