From eb127b4f8c4f58558efc7471f53636bcdd3fd62c Mon Sep 17 00:00:00 2001 From: Artem Chernikov Date: Wed, 30 Jul 2014 23:43:00 +0200 Subject: [PATCH] Add new styles to be checked --- .rubocop.yml | 4 ++++ .rubocop_todo.yml | 10 ---------- app/controllers/event_attachments_controller.rb | 4 ++-- app/controllers/schedule_controller.rb | 2 +- 4 files changed, 7 insertions(+), 13 deletions(-) diff --git a/.rubocop.yml b/.rubocop.yml index a76eda33..235aa49a 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -104,6 +104,10 @@ Style/Blocks: Style/BracesAroundHashParameters: Enabled: true +# +Style/CaseEquality: + Enabled: true + AllCops: Include: - '**/Rakefile' diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 4b51e808..e453a5a8 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -5,16 +5,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: 2 -# Cop supports --auto-correct. -# Configuration parameters: EnforcedStyle, SupportedStyles. -Style/BracesAroundHashParameters: - Enabled: false - -# Offense count: 1 -Style/CaseEquality: - Enabled: false - # Offense count: 20 # Configuration parameters: EnforcedStyle, SupportedStyles. Style/ClassAndModuleChildren: diff --git a/app/controllers/event_attachments_controller.rb b/app/controllers/event_attachments_controller.rb index a54fc2a4..9c366eb5 100644 --- a/app/controllers/event_attachments_controller.rb +++ b/app/controllers/event_attachments_controller.rb @@ -66,11 +66,11 @@ class EventAttachmentsController < ApplicationController respond_to do |format| if @upload.save - format.html { + format.html do render json: [@upload.to_jq_upload].to_json, content_type: 'text/html', layout: false - } + end format.json do render json: [@upload.to_jq_upload].to_json, status: :created, location: conference_proposal_event_attachment_path(@upload.event.conference.short_title, @upload.event, @upload) diff --git a/app/controllers/schedule_controller.rb b/app/controllers/schedule_controller.rb index 2e3bc96e..84a861b8 100644 --- a/app/controllers/schedule_controller.rb +++ b/app/controllers/schedule_controller.rb @@ -7,7 +7,7 @@ class ScheduleController < ApplicationController @events = @conference.events @dates = @conference.start_date..@conference.end_date - if @dates === Date.current + if @dates == Date.current @today = Date.current.strftime("%Y-%m-%d") else @today = @conference.start_date.strftime("%Y-%m-%d")