On 22 December 2010 16:24, Mauro <[email protected]> wrote: > On 22 December 2010 17:22, Colin Law <[email protected]> wrote: >> On 22 December 2010 15:56, Mauro <[email protected]> wrote: >>> For all my applicatino I use layout A. >>> In this layout I have <%= javascript_include_tag 'application.js' %> >>> and, in this javascript I have some code that I want to execute on all >>> pages exept one. >>> How can I exclude this javascript only for one page? >> >> You could extract that code to a separate .js file and have a separate >> layout for that page that does not include the new js file. > > But I have to duplicate the layout code only to not include a .js? > All the pages have the same layout.
Put all the common stuff in a separate file or files and yield to it/them from the layouts. Colin -- 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.

