Fix Layout/EndAlignment lint (#349) [skip ci]
This commit is contained in:
parent
bbd86842bd
commit
91c3eef1e1
8 changed files with 9 additions and 23 deletions
|
|
@ -6,20 +6,6 @@
|
|||
# Note that changes in the inspected code, or installation of new
|
||||
# versions of RuboCop, may require this file to be generated again.
|
||||
|
||||
# Offense count: 9
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyleAlignWith, AutoCorrect, Severity.
|
||||
# SupportedStylesAlignWith: keyword, variable, start_of_line
|
||||
Layout/EndAlignment:
|
||||
Exclude:
|
||||
- 'app/controllers/api/v0/articles_controller.rb'
|
||||
- 'app/controllers/articles_controller.rb'
|
||||
- 'app/controllers/chat_channels_controller.rb'
|
||||
- 'app/controllers/image_uploads_controller.rb'
|
||||
- 'app/helpers/application_helper.rb'
|
||||
- 'app/models/user.rb'
|
||||
- 'app/services/article_api_index_service.rb'
|
||||
|
||||
# Offense count: 1
|
||||
# Cop supports --auto-correct.
|
||||
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets.
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ module Api
|
|||
params[:tag_list].split(",")
|
||||
else
|
||||
["career", "discuss", "productivity"]
|
||||
end
|
||||
end
|
||||
@articles = []
|
||||
4.times do
|
||||
@articles << Suggester::Articles::Classic.new.get(tag_list)
|
||||
|
|
@ -58,7 +58,7 @@ module Api
|
|||
@article.to_json(only: [:id], methods: [:current_state_path])
|
||||
else
|
||||
@article.errors.to_json
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def article_params
|
||||
|
|
|
|||
|
|
@ -54,8 +54,8 @@ class ArticlesController < ApplicationController
|
|||
body_markdown: "---\ntitle: \npublished: false\ndescription: \ntags: \n---\n\n",
|
||||
processed_html: "",
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def edit
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ class ChatChannelsController < ApplicationController
|
|||
[current_user.username, params[:slug].gsub("@", "")].sort.join("/")
|
||||
else
|
||||
params[:slug]
|
||||
end
|
||||
end
|
||||
@active_channel = ChatChannel.find_by_slug(slug)
|
||||
@active_channel.current_user = current_user if @active_channel
|
||||
end
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ class ImageUploadsController < ApplicationController
|
|||
ApplicationController.helpers.cloud_cover_url(uploader.url)
|
||||
else
|
||||
uploader.url
|
||||
end
|
||||
end
|
||||
respond_to do |format|
|
||||
format.json { render json: { link: link }, status: 200 }
|
||||
end
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ module ApplicationHelper
|
|||
page_title
|
||||
else
|
||||
page_title + " - DEV Community 👩💻👨💻"
|
||||
end
|
||||
end
|
||||
content_for(:title) { derived_title }
|
||||
derived_title
|
||||
end
|
||||
|
|
|
|||
|
|
@ -350,7 +350,7 @@ class User < ApplicationRecord
|
|||
temp_username + "_" + rand(100).to_s
|
||||
else
|
||||
temp_username
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def temp_name_exists?
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class ArticleApiIndexService
|
|||
state_articles(state)
|
||||
else
|
||||
base_articles
|
||||
end
|
||||
end
|
||||
articles.
|
||||
decorate
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue