Fix Lint/ShadowingOuterLocalVariable (#455)
This commit is contained in:
parent
7760a8d196
commit
ac0d49cbd6
3 changed files with 40 additions and 46 deletions
|
|
@ -18,12 +18,6 @@ Lint/IneffectiveAccessModifier:
|
|||
- 'app/black_box/black_box.rb'
|
||||
- 'app/models/tweet.rb'
|
||||
|
||||
# Offense count: 3
|
||||
Lint/ShadowingOuterLocalVariable:
|
||||
Exclude:
|
||||
- 'app/views/api/v0/comments/index.json.jbuilder'
|
||||
- 'app/views/api/v0/comments/show.json.jbuilder'
|
||||
|
||||
# Offense count: 2
|
||||
# Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
|
||||
Lint/UselessAccessModifier:
|
||||
|
|
|
|||
|
|
@ -11,29 +11,29 @@ json.array! Comment.rooted_on(@commentable.id, @commentable_type).order("score D
|
|||
json.profile_image ProfileImage.new(comment.user).get(640)
|
||||
json.profile_image_90 ProfileImage.new(comment.user).get(90)
|
||||
end
|
||||
json.children comment.children.order("score DESC").each do |comment|
|
||||
json.id_code comment.id_code_generated
|
||||
json.body_html comment.processed_html
|
||||
json.children comment.children.order("score DESC").each do |children_comment|
|
||||
json.id_code children_comment.id_code_generated
|
||||
json.body_html children_comment.processed_html
|
||||
json.user do
|
||||
json.name comment.user.name
|
||||
json.username comment.user.username
|
||||
json.twitter_username comment.user.twitter_username
|
||||
json.github_username comment.user.github_username
|
||||
json.website_url comment.user.processed_website_url
|
||||
json.profile_image ProfileImage.new(comment.user).get(640)
|
||||
json.profile_image_90 ProfileImage.new(comment.user).get(90)
|
||||
json.name children_comment.user.name
|
||||
json.username children_comment.user.username
|
||||
json.twitter_username children_comment.user.twitter_username
|
||||
json.github_username children_comment.user.github_username
|
||||
json.website_url children_comment.user.processed_website_url
|
||||
json.profile_image ProfileImage.new(children_comment.user).get(640)
|
||||
json.profile_image_90 ProfileImage.new(children_comment.user).get(90)
|
||||
end
|
||||
json.children comment.children.order("score DESC").each do |comment|
|
||||
json.id_code comment.id_code_generated
|
||||
json.body_html comment.processed_html
|
||||
json.children children_comment.children.order("score DESC").each do |grandchild_comment|
|
||||
json.id_code grandchild_comment.id_code_generated
|
||||
json.body_html grandchild_comment.processed_html
|
||||
json.user do
|
||||
json.name comment.user.name
|
||||
json.username comment.user.username
|
||||
json.twitter_username comment.user.twitter_username
|
||||
json.github_username comment.user.github_username
|
||||
json.website_url comment.user.processed_website_url
|
||||
json.profile_image ProfileImage.new(comment.user).get(640)
|
||||
json.profile_image_90 ProfileImage.new(comment.user).get(90)
|
||||
json.name grandchild_comment.user.name
|
||||
json.username grandchild_comment.user.username
|
||||
json.twitter_username grandchild_comment.user.twitter_username
|
||||
json.github_username grandchild_comment.user.github_username
|
||||
json.website_url grandchild_comment.user.processed_website_url
|
||||
json.profile_image ProfileImage.new(grandchild_comment.user).get(640)
|
||||
json.profile_image_90 ProfileImage.new(grandchild_comment.user).get(90)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -10,29 +10,29 @@ json.user do
|
|||
json.profile_image ProfileImage.new(@comment.user).get(640)
|
||||
json.profile_image_90 ProfileImage.new(@comment.user).get(90)
|
||||
end
|
||||
json.children @comment.children.order("score DESC").each do |comment|
|
||||
json.id_code comment.id_code_generated
|
||||
json.body_html comment.processed_html
|
||||
json.children @comment.children.order("score DESC").each do |children_comment|
|
||||
json.id_code children_comment.id_code_generated
|
||||
json.body_html children_comment.processed_html
|
||||
json.user do
|
||||
json.name comment.user.name
|
||||
json.username comment.user.username
|
||||
json.twitter_username comment.user.twitter_username
|
||||
json.github_username comment.user.github_username
|
||||
json.website_url comment.user.processed_website_url
|
||||
json.profile_image ProfileImage.new(comment.user).get(640)
|
||||
json.profile_image_90 ProfileImage.new(comment.user).get(90)
|
||||
json.name children_comment.user.name
|
||||
json.username children_comment.user.username
|
||||
json.twitter_username children_comment.user.twitter_username
|
||||
json.github_username children_comment.user.github_username
|
||||
json.website_url children_comment.user.processed_website_url
|
||||
json.profile_image ProfileImage.new(children_comment.user).get(640)
|
||||
json.profile_image_90 ProfileImage.new(children_comment.user).get(90)
|
||||
end
|
||||
json.children comment.children.order("score DESC").each do |comment|
|
||||
json.id_code comment.id_code_generated
|
||||
json.body_html comment.processed_html
|
||||
json.children children_comment.children.order("score DESC").each do |grandchild_comment|
|
||||
json.id_code grandchild_comment.id_code_generated
|
||||
json.body_html grandchild_comment.processed_html
|
||||
json.user do
|
||||
json.name comment.user.name
|
||||
json.username comment.user.username
|
||||
json.twitter_username comment.user.twitter_username
|
||||
json.github_username comment.user.github_username
|
||||
json.website_url comment.user.processed_website_url
|
||||
json.profile_image ProfileImage.new(comment.user).get(640)
|
||||
json.profile_image_90 ProfileImage.new(comment.user).get(90)
|
||||
json.name grandchild_comment.user.name
|
||||
json.username grandchild_comment.user.username
|
||||
json.twitter_username grandchild_comment.user.twitter_username
|
||||
json.github_username grandchild_comment.user.github_username
|
||||
json.website_url grandchild_comment.user.processed_website_url
|
||||
json.profile_image ProfileImage.new(grandchild_comment.user).get(640)
|
||||
json.profile_image_90 ProfileImage.new(grandchild_comment.user).get(90)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue