aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/test/models/mass_assignment_specific.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/test/models/mass_assignment_specific.rb')
-rw-r--r--activemodel/test/models/mass_assignment_specific.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/activemodel/test/models/mass_assignment_specific.rb b/activemodel/test/models/mass_assignment_specific.rb
index 53b37369ff..1d123fa58c 100644
--- a/activemodel/test/models/mass_assignment_specific.rb
+++ b/activemodel/test/models/mass_assignment_specific.rb
@@ -20,6 +20,14 @@ class Person
public :sanitize_for_mass_assignment
end
+class Account
+ include ActiveModel::MassAssignmentSecurity
+ attr_accessible :name, :email, :as => [:default, :admin]
+ attr_accessible :admin, :as => :admin
+
+ public :sanitize_for_mass_assignment
+end
+
class Firm
include ActiveModel::MassAssignmentSecurity
@@ -65,4 +73,4 @@ end
class TightDescendant < TightPerson
attr_accessible :phone_number
attr_accessible :super_powers, :as => :admin
-end \ No newline at end of file
+end