Yes i also belive that it dosent fire up. If i go to : http://localhost:3000/javascripts/location_handler.js i get a - No route matches "/javascripts/location_handler.js" - error if i go to http://localhost:3000/javascripts/location_handler.js.erb i see the complete source
--- function countrySelected() { country_id = $('account_country').getValue(); var states = <%= @states.collect {|state| [state.country_id, h(state.name)]}.to_json %> <% for state in @states -%> states.push(new Array(<%= state.country_id %>, '<%=h state.name %>', < %= state.id %>)); <% end -%> options = $('account_state').options; options.length = 1; states.each(function(state) { if (state[0] == country_id) { options[options.length] = new Option(state[1], state[2]); } }); } --- In my routes file i have added match ":controller(/:action(/:id(.:format)))" Do i need to do some other configs ? On 22 Feb, 16:47, Hassan Schroeder <hassan.schroe...@gmail.com> wrote: > On Tue, Feb 22, 2011 at 12:05 AM, Niklas Nson <niklasn...@meantime.se> wrote: > > That gives me the error (in firebug) > > > illegal XML character > > [Stop on error] var states = <%= @states.collect {|st...ountry_id, > > h(state.name)]}.to_json %> > > If that's what the client is seeing, it would seem to indicate that your > *.js.erb file is not actually being evaluated. > > Is there anything (errors) in your logs to indicate why that might be? > > -- > Hassan Schroeder ------------------------ hassan.schroe...@gmail.com > twitter: @hassan -- 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.