diff --git a/app/models/application_model/has_associations.rb b/app/models/application_model/has_associations.rb index ff4ff47d3..0718aac30 100644 --- a/app/models/application_model/has_associations.rb +++ b/app/models/application_model/has_associations.rb @@ -105,6 +105,9 @@ returns next if !respond_to?(real_ids) attributes[real_ids] = send(real_ids) } + + filter_attributes(attributes) + Cache.write(key, attributes) attributes end @@ -164,12 +167,16 @@ returns attributes[destination] = user.login } + filter_attributes(attributes) + + attributes + end + + def filter_attributes(attributes) # remove forbitten attributes %w(password token tokens token_ids).each { |item| attributes.delete(item) } - - attributes end =begin