Skip to content

Instantly share code, notes, and snippets.

@jlsherrill
Created July 14, 2014 15:55
Show Gist options
  • Save jlsherrill/9ea5356dabc79f50c064 to your computer and use it in GitHub Desktop.
Save jlsherrill/9ea5356dabc79f50c064 to your computer and use it in GitHub Desktop.
diff --git a/db/seeds.rb b/db/seeds.rb
index e7964bb..1aa86fa 100644
--- a/db/seeds.rb
+++ b/db/seeds.rb
@@ -16,8 +16,9 @@ def format_errors(model = nil)
model.errors.full_messages.join(';')
end
+::User.current = ::User.anonymous_api_admin
+
unless hidden_user = ::User.hidden.first
- ::User.current = ::User.anonymous_api_admin
login = "hidden-#{Password.generate_random_string(6)}".downcase
hidden_user = ::User.new(:auth_source_id => AuthSourceInternal.first.id,
:login => login,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment