app/helpers/alchemy/admin/pages_helper.rb in alchemy_cms-2.4.rc2 vs app/helpers/alchemy/admin/pages_helper.rb in alchemy_cms-2.4.rc4

- old
+ new

@@ -47,10 +47,15 @@ def custom_tinymce_javascript_tags custom_config_string = " <script type='text/javascript'> jQuery(function($) { Alchemy.Tinymce.customInits = [];" - Alchemy::Tinymce.custom_config_contents.each do |content| + custom_config_contents = Alchemy::Tinymce.custom_config_contents + content_names = custom_config_contents.collect{ |c| c['name'] } + if content_names.uniq.length != content_names.length + raise "Duplicated content names with tinymce setting in elements.yml found. Please rename these contents." + end + custom_config_contents.each do |content| next unless content['settings']['tinymce'] config = Alchemy::Tinymce.init.merge(content['settings']['tinymce'].symbolize_keys) config = config.collect { |key, value| "#{key} : #{value.to_json}" }.join(', ') custom_config_string += " Alchemy.Tinymce.customInits.push(function(callback) {