mirror of
https://github.com/discourse/discourse-data-explorer.git
synced 2025-06-29 19:12:11 +00:00
DEV: rubocop improvements for plugin.rb
This commit is contained in:
parent
8720c2cd5c
commit
77d603098f
10
plugin.rb
10
plugin.rb
@ -48,7 +48,7 @@ after_initialize do
|
|||||||
isolate_namespace DataExplorer
|
isolate_namespace DataExplorer
|
||||||
end
|
end
|
||||||
|
|
||||||
class ValidationError < StandardError;
|
class ValidationError < StandardError
|
||||||
end
|
end
|
||||||
|
|
||||||
class SmallBadgeSerializer < ApplicationSerializer
|
class SmallBadgeSerializer < ApplicationSerializer
|
||||||
@ -61,8 +61,12 @@ after_initialize do
|
|||||||
def excerpt
|
def excerpt
|
||||||
Post.excerpt(object.cooked, 70)
|
Post.excerpt(object.cooked, 70)
|
||||||
end
|
end
|
||||||
def username; object.user && object.user.username; end
|
def username
|
||||||
def avatar_template; object.user && object.user.avatar_template; end
|
object.user && object.user.username
|
||||||
|
end
|
||||||
|
def avatar_template
|
||||||
|
object.user && object.user.avatar_template
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Run a data explorer query on the currently connected database.
|
# Run a data explorer query on the currently connected database.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user