Skip to content

Commit

Permalink
start using ApplicationRecord
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoll committed Jan 8, 2018
1 parent 9944d65 commit d10d386
Show file tree
Hide file tree
Showing 16 changed files with 16 additions and 20 deletions.
4 changes: 0 additions & 4 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,6 @@ Rails/SkipsModelValidations:
Style/SymbolArray:
Enabled: false

# for compatibility with Foreman 1.15
Rails/ApplicationRecord:
Enabled: false

Style/FormatString:
Enabled: false

Expand Down
2 changes: 1 addition & 1 deletion app/models/foreign_input_set.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class ForeignInputSet < ActiveRecord::Base
class ForeignInputSet < ApplicationRecord
include ForemanRemoteExecution::Exportable

class CircularDependencyError < Foreman::Exception
Expand Down
2 changes: 1 addition & 1 deletion app/models/job_invocation.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class JobInvocation < ActiveRecord::Base
class JobInvocation < ApplicationRecord
include Authorizable
audited :except => [ :task_id, :targeting_id, :task_group_id, :triggering_id ]

Expand Down
2 changes: 1 addition & 1 deletion app/models/job_template_effective_user.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class JobTemplateEffectiveUser < ActiveRecord::Base
class JobTemplateEffectiveUser < ApplicationRecord

belongs_to :job_template

Expand Down
2 changes: 1 addition & 1 deletion app/models/remote_execution_feature.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class RemoteExecutionFeature < ActiveRecord::Base
class RemoteExecutionFeature < ApplicationRecord
VALID_OPTIONS = [:provided_inputs, :description, :host_action_button].freeze
validates :label, :name, :presence => true, :uniqueness => true

Expand Down
2 changes: 1 addition & 1 deletion app/models/target_remote_execution_proxy.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class TargetRemoteExecutionProxy < ActiveRecord::Base
class TargetRemoteExecutionProxy < ApplicationRecord
belongs_to :remote_execution_proxy, :class_name => 'SmartProxy'
belongs_to :target, :polymorphic => true
end
2 changes: 1 addition & 1 deletion app/models/targeting.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class Targeting < ActiveRecord::Base
class Targeting < ApplicationRecord

STATIC_TYPE = 'static_query'.freeze
DYNAMIC_TYPE = 'dynamic_query'.freeze
Expand Down
2 changes: 1 addition & 1 deletion app/models/targeting_host.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class TargetingHost < ActiveRecord::Base
class TargetingHost < ApplicationRecord

belongs_to :targeting
belongs_to_host
Expand Down
2 changes: 1 addition & 1 deletion app/models/template_input.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class TemplateInput < ActiveRecord::Base
class TemplateInput < ApplicationRecord
include ForemanRemoteExecution::Exportable

class ValueNotReady < ::Foreman::Exception
Expand Down
2 changes: 1 addition & 1 deletion app/models/template_invocation.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class TemplateInvocation < ActiveRecord::Base
class TemplateInvocation < ApplicationRecord
include Authorizable
include ForemanTasks::Concerns::ActionSubject

Expand Down
2 changes: 1 addition & 1 deletion app/models/template_invocation_input_value.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class TemplateInvocationInputValue < ActiveRecord::Base
class TemplateInvocationInputValue < ApplicationRecord

belongs_to :template_invocation
belongs_to :template_input
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20150903192731_add_execution_to_interface.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class AddExecutionToInterface < ActiveRecord::Migration[4.2]
class FakeNic < ActiveRecord::Base
class FakeNic < ApplicationRecord
self.table_name = 'nics'

def type
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class AddHostIdToTemplateInvocation < ActiveRecord::Migration[4.2]
class FakeTemplateInvocation < ActiveRecord::Base
class FakeTemplateInvocation < ApplicationRecord
self.table_name = 'template_invocations'
end

Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20151217092555_migrate_to_task_groups.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class MigrateToTaskGroups < ActiveRecord::Migration[4.2]
class FakeJobInvocation < ActiveRecord::Base
class FakeJobInvocation < ApplicationRecord
self.table_name = 'job_invocations'
end

Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20160111113032_upcase_ssh_feature.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class UpcaseSshFeature < ActiveRecord::Migration[4.2]
class FakeFeature < ActiveRecord::Base
class FakeFeature < ApplicationRecord
self.table_name = 'features'
end

Expand Down
4 changes: 2 additions & 2 deletions db/migrate/20160113162007_expand_all_template_invocations.rb
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
class ExpandAllTemplateInvocations < ActiveRecord::Migration[4.2]
class FakeTemplateInvocation < ActiveRecord::Base
class FakeTemplateInvocation < ApplicationRecord
self.table_name = 'template_invocations'

has_many :input_values, :class_name => 'FakeInputValue', :foreign_key => 'template_invocation_id'
end

class FakeInputValue < ActiveRecord::Base
class FakeInputValue < ApplicationRecord
self.table_name = 'template_invocation_input_values'
end

Expand Down

0 comments on commit d10d386

Please sign in to comment.