_javascript.rhtml 785 Bytes
<%= javascript_include_tag :defaults, 'jquery-latest.js',
'jquery.noconflict.js', 'jquery.cycle.all.min.js', 'thickbox.js', 'lightbox', 'colorbox',
'jquery-ui-1.8.2.custom.min', 'jquery.scrollTo', 'jquery.form.js', 'jquery-validation/jquery.validate',
'jquery.cookie', 'jquery.ba-bbq.min.js', 'reflection', 'jquery.tokeninput',
'add-and-join', 'report-abuse', 'catalog', 'manage-products',
'jquery-ui-timepicker-addon', :cache => 'cache-general' %>

<% language = FastGettext.locale %>
<% %w{messages methods}.each do |type| %>
  <% require_path = File.join('jquery-validation', 'localization', type+'_'+language) %>
  <% full_path = File.join(Rails.root, 'public', 'javascripts', require_path+'.js')%>
  <%= javascript_include_tag require_path if File.exists?(full_path) %>
<% end %>