iso .. wrote:> I have a file in views/admin/contents/new.js that I would like to be
> returned on a request from a script tag ex:
> <script
src="http://localhost:3000/admin/pages/1/contents/new.js"
> type="text/javascript"></script>
>
> If I test out the js request manually, ie entering the js url in the
> browser, I get the error shown below:
> ---------
> Template is missing
>
> Missing layout layouts/admin.js.erb in view path
> /Users/chris/Documents/Projects/Rails/test_proj/app/views
>
> ---------
>
> It is **Missing layout layouts/admin.js.erb** that I don''t
understand.
> Why is this being routed in this way? It should be
> admin/views/contents/new.js.
>
> Thanks for the help.
I should add that I have no problem obtaining the js files if they are
not nested in a route, ie.
map.namespace do |admin|
admin.resources :content_files
end
allows me to fetch the new js template file from
views/admin/content_files/new.js.erb
Has anyone else had this problem?
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---