lib/active_admin/resource/scopes.rb in activeadmin-1.0.0.pre4 vs lib/active_admin/resource/scopes.rb in activeadmin-1.0.0.pre5

- old
+ new

@@ -29,9 +29,10 @@ def scope(*args, &block) options = args.extract_options! title = args[0] rescue nil method = args[1] rescue nil + options[:localizer] ||= ActiveAdmin::Localizers.resource(self) scope = ActiveAdmin::Scope.new(title, method, options, &block) # Finds and replaces a scope by the same name if it already exists existing_scope_index = scopes.index{|existing_scope| existing_scope.id == scope.id } if existing_scope_index