HEX
Server: Apache
System: Linux s198.coreserver.jp 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: nagasaki (10062)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: //usr/local/rvm/gems/default/doc/activerecord-6.1.4.1/ri/ActiveRecord/Relation/new-i.ri
U:RDoc::AnyMethod[iI"new:ETI"ActiveRecord::Relation#new;TF:publico:RDoc::Markup::Document:@parts[
o:RDoc::Markup::Paragraph;	[I"HInitializes new record from relation while maintaining the current ;TI"scope.;To:RDoc::Markup::BlankLineo;
;	[I"YExpects arguments in the same format as {ActiveRecord::Base.new}[rdoc-ref:Core.new].;T@o:RDoc::Markup::Verbatim;	[I"%users = User.where(name: 'DHH')
;TI"Zuser = users.new # => #<User id: nil, name: "DHH", created_at: nil, updated_at: nil>
;T:@format0o;
;	[I"FYou can also pass a block to new with the new record as argument:;T@o;;	[I"5user = users.new { |user| user.name = 'Oscar' }
;TI"user.name # => Oscar;T;
0:
@fileI""lib/active_record/relation.rb;T:0@omit_headings_from_table_of_contents_below000[[I"
build;To;;	[;@;0I"(attributes = nil, &block);T@FI"
Relation;TcRDoc::NormalClass00