Autocorrect new rubocop offenses
This commit is contained in:
parent
deda3d4273
commit
988b3bf689
24 changed files with 48 additions and 41 deletions
|
|
@ -8,7 +8,7 @@ class MigrateRolesForCancancan < ActiveRecord::Migration
|
|||
Role.all.each do |role|
|
||||
role.users.each do |user|
|
||||
Conference.all.each do |conference|
|
||||
if role.name == 'Admin' || role.name == 'Organizer'
|
||||
if ['Admin', 'Organizer'].include?(role.name)
|
||||
user.add_role :organizer, conference
|
||||
user.update_columns(is_admin: true)
|
||||
else
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ class MoveConferencesToOrganizations < ActiveRecord::Migration
|
|||
add_reference :conferences, :organization, index: true
|
||||
|
||||
TempConference.reset_column_information
|
||||
if TempConference.count != 0
|
||||
if TempConference.any?
|
||||
organization = TempOrganization.create(name: 'organization', description: 'Default organization')
|
||||
TempConference.all.each do |conference|
|
||||
conference.organization_id = organization.id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue