From 2d7ae1b08ee2a10b12cbfeef3a6cc6da55b57df6 Mon Sep 17 00:00:00 2001 From: Guillermo Iguaran Date: Wed, 12 Sep 2012 11:35:05 -0500 Subject: Remove mass_assignment_options from ActiveRecord --- activerecord/test/models/bulb.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'activerecord/test/models') diff --git a/activerecord/test/models/bulb.rb b/activerecord/test/models/bulb.rb index 967f733fe3..e4c0278c0d 100644 --- a/activerecord/test/models/bulb.rb +++ b/activerecord/test/models/bulb.rb @@ -18,12 +18,12 @@ class Bulb < ActiveRecord::Base self[:color] = color.upcase + "!" end - def self.new(attributes = {}, options = {}, &block) + def self.new(attributes = {}, &block) bulb_type = (attributes || {}).delete(:bulb_type) - if options && options[:as] == :admin && bulb_type.present? + if bulb_type.present? bulb_class = "#{bulb_type.to_s.camelize}Bulb".constantize - bulb_class.new(attributes, options, &block) + bulb_class.new(attributes, &block) else super end -- cgit v1.2.3