Skip to content

Commit 384ff03

Browse files
committed
Autocorrect Style/RedundantParentheses
1 parent e1debfd commit 384ff03

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

app/controllers/admin/articles_controller.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ def autosave
123123
if @article.save
124124
flash[:success] = I18n.t("admin.articles.autosave.success")
125125
@must_update_calendar =
126-
(params[:article][:published_at] and
127-
params[:article][:published_at].to_time.to_i < Time.zone.now.to_time.to_i and
128-
@article.parent_id.nil?)
126+
params[:article][:published_at] and
127+
params[:article][:published_at].to_time.to_i < Time.zone.now.to_time.to_i and
128+
@article.parent_id.nil?
129129
respond_to do |format|
130130
format.js
131131
end

app/controllers/comments_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def preview
3232

3333
def recaptcha_ok_for?(comment)
3434
use_recaptcha = comment.blog.use_recaptcha
35-
((use_recaptcha && verify_recaptcha(model: comment)) || !use_recaptcha)
35+
(use_recaptcha && verify_recaptcha(model: comment)) || !use_recaptcha
3636
end
3737

3838
def new_comment_defaults

app/helpers/base_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ def show_meta_keyword
198198
end
199199

200200
def stop_index_robots?(blog)
201-
stop = (params[:year].present? || params[:page].present?)
201+
stop = params[:year].present? || params[:page].present?
202202
stop = blog.unindex_tags if controller_name == "tags"
203203
stop = blog.unindex_categories if controller_name == "categories"
204204
stop

0 commit comments

Comments
 (0)