diff --git a/app/models/discourse_single_sign_on.rb b/app/models/discourse_single_sign_on.rb index 52eff1357..b75ebd461 100644 --- a/app/models/discourse_single_sign_on.rb +++ b/app/models/discourse_single_sign_on.rb @@ -92,7 +92,7 @@ class DiscourseSingleSignOn < SingleSignOn sso_record.last_payload = unsigned_payload sso_record.external_id = external_id else - sso_record = user.create_single_sign_on_record(last_payload: unsigned_payload, + user.create_single_sign_on_record(last_payload: unsigned_payload, external_id: external_id, external_username: username, external_email: email, diff --git a/app/models/invite_redeemer.rb b/app/models/invite_redeemer.rb index bda7870aa..15c2cb6cc 100644 --- a/app/models/invite_redeemer.rb +++ b/app/models/invite_redeemer.rb @@ -99,7 +99,7 @@ InviteRedeemer = Struct.new(:invite, :username, :name) do end def approve_account_if_needed - invited_user.approve(invite.invited_by_id, send_email=false) + invited_user.approve(invite.invited_by_id, false) end def notify_invitee diff --git a/app/models/plugin_store.rb b/app/models/plugin_store.rb index 5ef649e07..ecf8d9c73 100644 --- a/app/models/plugin_store.rb +++ b/app/models/plugin_store.rb @@ -8,7 +8,7 @@ class PluginStore def self.set(plugin_name, key, value) hash = {plugin_name: plugin_name, key: key} - row = PluginStoreRow.find_by(hash) || row = PluginStoreRow.new(hash) + row = PluginStoreRow.find_by(hash) || PluginStoreRow.new(hash) row.type_name = determine_type(value) # nil are stored as nil diff --git a/app/models/topic_embed.rb b/app/models/topic_embed.rb index ffb1f6915..1d284d80a 100644 --- a/app/models/topic_embed.rb +++ b/app/models/topic_embed.rb @@ -151,7 +151,7 @@ class TopicEmbed < ActiveRecord::Base def self.expanded_for(post) Rails.cache.fetch("embed-topic:#{post.topic_id}", expires_in: 10.minutes) do url = TopicEmbed.where(topic_id: post.topic_id).pluck(:embed_url).first - title, body = TopicEmbed.find_remote(url) + _title, body = TopicEmbed.find_remote(url) body << TopicEmbed.imported_from_html(url) body end diff --git a/app/models/user.rb b/app/models/user.rb index b9ebf9034..1ec99c667 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -173,7 +173,6 @@ class User < ActiveRecord::Base end def change_username(new_username) - current_username = self.username self.username = new_username save end diff --git a/lib/cooked_post_processor.rb b/lib/cooked_post_processor.rb index f8bed1bc3..208aa5d3a 100644 --- a/lib/cooked_post_processor.rb +++ b/lib/cooked_post_processor.rb @@ -69,7 +69,7 @@ class CookedPostProcessor @doc.css("img[src^='data']") - # minus, image inside oneboxes oneboxed_images - - # minux, images inside quotes + # minus, images inside quotes @doc.css(".quote img") end