removed useless assignments at some places
This commit is contained in:
parent
7d068c1432
commit
3fd784b513
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -173,7 +173,6 @@ class User < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def change_username(new_username)
|
||||
current_username = self.username
|
||||
self.username = new_username
|
||||
save
|
||||
end
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue