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/ruby-2.5.9/doc/activerecord-6.1.4.1/ri/ActiveRecord/Persistence/becomes-i.ri
U:RDoc::AnyMethod[iI"becomes:ETI"&ActiveRecord::Persistence#becomes;TF:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph;	[I"MReturns an instance of the specified +klass+ with the attributes of the ;TI"Gcurrent record. This is mostly useful in relation to single-table ;TI"Ginheritance structures where you want a subclass to appear as the ;TI"Fsuperclass. This can be used along with record identification in ;TI"JAction Pack to allow, say, <tt>Client < Company</tt> to do something ;TI"Klike render <tt>partial: @client.becomes(Company)</tt> to render that ;TI"Linstance using the companies/company partial instead of clients/client.;To:RDoc::Markup::BlankLineo;
;	[	I"\Note: The new instance will share a link to the same attributes as the original class. ;TI"<Therefore the sti column value will still be the same. ;TI"QAny change to the attributes on either instance will affect both instances. ;TI"IIf you want to change the sti column as well, use #becomes! instead.;T:
@fileI"%lib/active_record/persistence.rb;T:0@omit_headings_from_table_of_contents_below000[I"(klass);T@FI"Persistence;TcRDoc::NormalModule00