connection_handler=

connection_handler=(handler) Class Public methods

disable_implicit_join_references=

disable_implicit_join_references=(value) Class Public methods

new

new(attributes = nil, options = {}) Class Public methods New objects can be instantiated as either empty (pass no construction parameter) or pre-set with attributes but not yet saved (pass a hash with key names matching the associated table column names). In both instances, valid attribute keys are determined by the column names of the associated table â hence you can't have attributes that aren't part of the table columns. Example: # Instantiates a single new object User.new(first

<=>

<=>(other_object) Instance Public methods Allows sort on objects

==

==(comparison_object) Instance Public methods Returns true if comparison_object is the same exact object, or comparison_object is of the same type and self has an ID and it is equal to comparison_object.id. Note that new records are different from any other record by definition, unless the other record is the receiver itself. Besides, if you fetch existing records with select and leave the ID out, you're on your own, this predicate will return false. Note also that destroying a rec

clone

clone Instance Public methods Identical to Ruby's clone method. This is a âshallowâ copy. Be warned that your attributes are not copied. That means that modifying attributes of the clone will modify the original, since they will both point to the same attributes hash. If you need a copy of your attributes hash, please use the dup method. user = User.first new_user = user.clone user.name # => "Bob" new_user.name = "Joe" user.name # => "Joe" user.

connection_handler 2

connection_handler() Instance Public methods

dup

dup Instance Public methods Duped objects have no id assigned and are treated as new records. Note that this is a âshallowâ copy as it copies the object's attributes only, not its associations. The extent of a âdeepâ copy is application specific and is therefore left to the application to implement according to its need. The dup method does not preserve the timestamps (created|updated)_(at|on).

encode_with

encode_with(coder) Instance Public methods Populate coder with attributes about this record that should be serialized. The structure of coder defined in this method is guaranteed to match the structure of coder passed to the init_with method. Example: class Post < ActiveRecord::Base end coder = {} Post.new.encode_with(coder) coder # => {"attributes" => {"id" => nil, ... }}

eql?

eql?(comparison_object) Instance Public methods Alias for: ==