From 897787604c61575ea1a4559c5ae186abb2b3d039 Mon Sep 17 00:00:00 2001 From: Alexander Bach Date: Tue, 2 Jun 2015 16:47:07 +0200 Subject: [PATCH] Make writable_attributes public --- lib/api/contracts/model_contract.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/api/contracts/model_contract.rb b/lib/api/contracts/model_contract.rb index 35c329d906..61d5fc9292 100644 --- a/lib/api/contracts/model_contract.rb +++ b/lib/api/contracts/model_contract.rb @@ -48,6 +48,10 @@ module API end end + def writable_attributes + collect_ancestor_attributes(:writable_attributes) + end + validate :readonly_attributes_unchanged validate :run_attribute_validations @@ -63,10 +67,6 @@ module API attribute_validations.each { |validation| instance_exec(&validation) } end - def writable_attributes - collect_ancestor_attributes(:writable_attributes) - end - def attribute_validations collect_ancestor_attributes(:attribute_validations) end