Skip to content

Commit

Permalink
Add api_allowed_attributes to ExtManagementSystem and Provider
Browse files Browse the repository at this point in the history
The addition of the api_allowed_attributes method 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 12, 2018
1 parent 57dac5a commit 37a0b23
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/models/ext_management_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ def self.supported_types_and_descriptions_hash
end
end

def self.api_allowed_attributes
%w[]
end

belongs_to :provider
has_many :child_managers, :class_name => 'ExtManagementSystem', :foreign_key => 'parent_ems_id'

Expand Down
4 changes: 4 additions & 0 deletions app/models/provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ def self.short_token
parent.name.demodulize
end

def self.api_allowed_attributes
%w[]
end

def image_name
self.class.short_token.underscore
end
Expand Down

0 comments on commit 37a0b23

Please sign in to comment.