method
to_ary
v7.1.3.4 -
Show latest stable
- Class:
ActiveRecord::Relation
to_ary()public
Converts relation objects to Array.
# File activerecord/lib/active_record/relation.rb, line 258
def to_ary
records.dup
end Related methods
- Instance methods
- ==
- _exec_scope
- alias_tracker
- any?
- bind_attribute
- blank?
- build
- cache_key
- cache_key_with_version
- cache_version
- create
- create!
- create_or_find_by
- create_or_find_by!
- delete_all
- delete_by
- destroy_all
- destroy_by
- eager_loading?
- empty?
- empty_scope?
- encode_with
- explain
- find_or_create_by
- find_or_create_by!
- find_or_initialize_by
- first_or_create
- first_or_create!
- first_or_initialize
- has_limit_or_offset?
- initialize_copy
- inspect
- joined_includes_values
- load
- load_async
- many?
- new
- none?
- one?
- preload_associations
- pretty_print
- records
- reload
- reset
- scheduled?
- scope_for_create
- scoping
- size
- to_a
- to_ary
- to_sql
- touch_all
- update
- update!
- update_all
- update_counters
- values
- values_for_queries
- where_values_hash
- Class methods
- new
- Protected methods
-
load_records - Private methods
-
_create -
_create! -
_increment_attribute -
_new -
_scoping -
_substitute_values -
already_in_scope? -
compute_cache_key -
compute_cache_version -
current_scope_restoring_block -
exec_main_query -
exec_queries -
global_scope? -
instantiate_records -
limited_count -
references_eager_loaded_tables? -
skip_query_cache_if_necessary -
tables_in_string