method
to_yaml
v3.2.1 -
Show latest stable
- Class:
ActiveRecord::Base
to_yaml(opts = {})public
Hackery to accomodate Syck. Remove for 4.0.
# File activerecord/lib/active_record/base.rb, line 648
def to_yaml(opts = {}) #:nodoc:
if YAML.const_defined?(:ENGINE) && !YAML::ENGINE.syck?
super
else
coder = {}
encode_with(coder)
YAML.quick_emit(self, opts) do |out|
out.map(taguri, to_yaml_style) do |map|
coder.each { |k, v| map.add(k, v) }
end
end
end
end Related methods
- Instance methods
- <=>
- ==
- connection
- dup
- encode_with
- eql?
- freeze
- frozen?
- hash
- init_with
- initialize_dup
- inspect
- readonly!
- readonly?
- to_yaml
- yaml_initialize
- Class methods
- ===
- arel_engine
- arel_table
- clear_active_connections!
- configurations
- connected?
- connection
- connection_config
- connection_handler
- connection_id
- connection_id=
- connection_pool
- default_timezone
- establish_connection
- generated_feature_methods
- inherited
- initialize_generated_modules
- inspect
- logger
- mysql2_connection
- mysql_connection
- new
- postgresql_connection
- remove_connection
- retrieve_connection
- schema_format
- sqlite3_connection
- timestamped_migrations
- Private methods
-
relation -
to_ary