Commit 79780a17 authored by Eugen Rochko's avatar Eugen Rochko

Fix #2 - You wouldn't believe how many times I had a first_or_initialize-related…

Fix #2 - You wouldn't believe how many times I had a first_or_initialize-related bug. It's the worst-named function that ever existed
parent 343bee28
......@@ -250,7 +250,7 @@ Devise.setup do |config|
config.omniauth :twitter, ENV['TWITTER_CLIENT_ID'], ENV['TWITTER_CLIENT_SECRET']
config.omniauth :mastodon, scope: 'read follow', credentials: lambda { |domain, callback_url|
client = MastodonClient.first_or_initialize(domain: domain)
client = MastodonClient.where(domain: domain).first_or_initialize(domain: domain)
return [client.client_id, client.client_secret] unless client.new_record?
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment