HEX
Server: Apache
System: Windows NT MAGNETO-ARM 10.0 build 22000 (Windows 10) AMD64
User: Michel (0)
PHP: 7.4.7
Disabled: NONE
Upload Files
File: C:/Ruby27-x64/lib/ruby/gems/2.7.0/doc/activerecord-7.0.4.2/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"Minheritance (STI) 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