:) I moved the file to /views/javascripts/getlocation.js.erb But there must be something wrong with routes or something else still.
If i go to: http://localhost:3000/javascripts/getlocation.js i get a No route matches "/javascripts/getlocation.js" error. [Routes] ModcubeApp::Application.routes.draw do get "log_in" => "sessions#new", :as => "log_in" get "sign_up" => "accounts#new", :as => "sign_up" root :to => "pages#home" resources :accounts match ":controller(/:action(/:id(.:format)))" end [javascripts_controller.rb] class JavascriptsController < ApplicationController def getlocation @states = State.find(:all) @citys = City.find(:all) end end //Niklas On 22 Feb, 20:25, Hassan Schroeder <[email protected]> wrote: > On Tue, Feb 22, 2011 at 10:51 AM, Niklas Nson <[email protected]> wrote: > > Yes i also belive that it dosent fire up. If i go to : > >http://localhost:3000/javascripts/location_handler.js > > Oops. That's the problem -- files under public are static, that is, *not* > interpreted. You need to put your file somewhere within app/views. > > -- > Hassan Schroeder ------------------------ [email protected] > 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 [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.

