Hi, Rails does not process js files directly. I would do one of 2 things :-
1. Output any data that you require from the user object into a script tag within the page that uses the javascript and pass that data through to your javascript code. 2. Use rails RJS feature (see http://guides.rubyonrails.org/layouts_and_rendering.html and search for RJS) Cheers Gary On Oct 28, 4:53 am, bertly_the_coder <much...@gmail.com> wrote: > Hey guys, > > This seems pretty simple, but I cannot seem to find an answer online. > I have a user model and would like to use a user object in the js > file. Any ideas as to how I can do this? > > Thanks and Regards. -- 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-t...@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.