Skip to content

Commit

Permalink
Add API_ALLOWED_ATTRIBUTES constant to ExtManagementSystem and Provider
Browse files Browse the repository at this point in the history
The addition of this constant will allow individual providers to have better control over the attributes that are allowed on a provider, including aliases that are more clear to the user.
  • Loading branch information
Jillian Tullo committed Jan 11, 2018
1 parent 57dac5a commit ccdb43c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/models/ext_management_system.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
class ExtManagementSystem < ApplicationRecord
include CustomActionsMixin

API_ALLOWED_ATTRIBUTES = %w().freeze

def self.types
leaf_subclasses.collect(&:ems_type)
end
Expand Down
2 changes: 2 additions & 0 deletions app/models/provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ class Provider < ApplicationRecord
include EmsRefresh::Manager
include TenancyMixin

API_ALLOWED_ATTRIBUTES = %w().freeze

belongs_to :tenant
belongs_to :zone
has_many :managers, :class_name => "ExtManagementSystem"
Expand Down

0 comments on commit ccdb43c

Please sign in to comment.