diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2012-09-12 11:35:05 -0500 |
---|---|---|
committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2012-09-16 23:59:05 -0500 |
commit | 2d7ae1b08ee2a10b12cbfeef3a6cc6da55b57df6 (patch) | |
tree | ab1f52a552683df0ca320be0356bc73c4081c890 /activerecord/lib/active_record/associations/singular_association.rb | |
parent | 6ae93a0fdf457fb964149c976e7da734a548cec3 (diff) | |
download | rails-2d7ae1b08ee2a10b12cbfeef3a6cc6da55b57df6.tar.gz rails-2d7ae1b08ee2a10b12cbfeef3a6cc6da55b57df6.tar.bz2 rails-2d7ae1b08ee2a10b12cbfeef3a6cc6da55b57df6.zip |
Remove mass_assignment_options from ActiveRecord
Diffstat (limited to 'activerecord/lib/active_record/associations/singular_association.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/singular_association.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/activerecord/lib/active_record/associations/singular_association.rb b/activerecord/lib/active_record/associations/singular_association.rb index b84cb4922d..32f4557c28 100644 --- a/activerecord/lib/active_record/associations/singular_association.rb +++ b/activerecord/lib/active_record/associations/singular_association.rb @@ -17,16 +17,16 @@ module ActiveRecord replace(record) end - def create(attributes = {}, options = {}, &block) - create_record(attributes, options, &block) + def create(attributes = {}, &block) + create_record(attributes, &block) end - def create!(attributes = {}, options = {}, &block) - create_record(attributes, options, true, &block) + def create!(attributes = {}, &block) + create_record(attributes, true, &block) end - def build(attributes = {}, options = {}) - record = build_record(attributes, options) + def build(attributes = {}) + record = build_record(attributes) yield(record) if block_given? set_new_record(record) record @@ -51,8 +51,8 @@ module ActiveRecord replace(record) end - def create_record(attributes, options, raise_error = false) - record = build_record(attributes, options) + def create_record(attributes, raise_error = false) + record = build_record(attributes) yield(record) if block_given? saved = record.save set_new_record(record) |