rubocop files update and auto correction
This commit is contained in:
parent
1a62dc930e
commit
1f82fbbdc6
88 changed files with 519 additions and 452 deletions
|
|
@ -1,6 +1,6 @@
|
|||
class CreateAhoyEvents < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :ahoy_events do |t|
|
||||
create_table :ahoy_events do |t|
|
||||
t.uuid :visit_id
|
||||
# user
|
||||
t.integer :user_id
|
||||
|
|
|
|||
|
|
@ -42,12 +42,12 @@ class AddEventsPerWeekToConference < ActiveRecord::Migration
|
|||
end
|
||||
|
||||
if event_version.object_changes &&
|
||||
event_version.event == 'create'
|
||||
event_version.event == 'create'
|
||||
|
||||
# Increment the new state
|
||||
conference.events_per_week[week][:new] += 1
|
||||
elsif event_version.object_changes &&
|
||||
event_version.object_changes[:state]
|
||||
event_version.object_changes[:state]
|
||||
|
||||
prev_state = event_version.object_changes[:state][0].to_sym
|
||||
next_state = event_version.object_changes[:state][1].to_sym
|
||||
|
|
@ -55,7 +55,7 @@ class AddEventsPerWeekToConference < ActiveRecord::Migration
|
|||
# Backward compatibility: deprecated state :review now :new
|
||||
if prev_state == :review
|
||||
prev_state = :new
|
||||
elsif next_state == :review
|
||||
elsif next_state == :review
|
||||
next_state = :new
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ class CreateDelayedJobs < ActiveRecord::Migration
|
|||
create_table :delayed_jobs, force: true do |table|
|
||||
table.integer :priority, default: 0, null: false # Allows some jobs to jump to the front of the queue
|
||||
table.integer :attempts, default: 0, null: false # Provides for retries, but still fail eventually.
|
||||
table.text :handler, null: false # YAML-encoded string of the object that will do work
|
||||
table.text :handler, null: false # YAML-encoded string of the object that will do work
|
||||
table.text :last_error # reason for last failure (See Note below)
|
||||
table.datetime :run_at # When to run. Could be Time.zone.now for immediately, or sometime in the future.
|
||||
table.datetime :locked_at # Set when a client is working on this object
|
||||
|
|
|
|||
|
|
@ -17,9 +17,7 @@ class MigrateRolesForCancancan < ActiveRecord::Migration
|
|||
end
|
||||
|
||||
# Delete old roles
|
||||
Role.first(old_roles).each do |role|
|
||||
role.destroy
|
||||
end
|
||||
Role.first(old_roles).each(&:destroy)
|
||||
end
|
||||
|
||||
def down
|
||||
|
|
|
|||
|
|
@ -42,9 +42,9 @@ class MigratingSupporterRegistrationsToTicketUsers < ActiveRecord::Migration
|
|||
# Sum up if a user has bought more than one ticket
|
||||
TempSupporterRegistrations.all.each do |s|
|
||||
sup_reg = TempSupporterRegistrations.where(
|
||||
ticket_id: s.ticket_id,
|
||||
user_id: s.user_id,
|
||||
conference_id: s.conference_id)
|
||||
ticket_id: s.ticket_id,
|
||||
user_id: s.user_id,
|
||||
conference_id: s.conference_id)
|
||||
quantity = sup_reg.count
|
||||
|
||||
if quantity > 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue