mirror of
https://github.com/discourse/discourse.git
synced 2025-03-22 18:55:41 +08:00
Refactored conditional to an || to be more idiomatic.
This commit is contained in:
parent
c793684d4c
commit
d30330441a
@ -77,10 +77,7 @@ class Group < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def self.[](name)
|
||||
unless g = lookup_group(name)
|
||||
g = refresh_automatic_group!(name)
|
||||
end
|
||||
g
|
||||
lookup_group(name) || refresh_automatic_group!(name)
|
||||
end
|
||||
|
||||
def self.lookup_group(name)
|
||||
|
Loading…
x
Reference in New Issue
Block a user