1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Add doc to #attribute_names

This commit is contained in:
Sebastian Martinez 2011-05-15 21:33:49 -03:00
parent d043d65396
commit 2470392e89

View file

@ -767,6 +767,9 @@ module ActiveRecord #:nodoc:
super || (table_exists? && column_names.include?(attribute.to_s.sub(/=$/, '')))
end
# Returns an array of column names as strings if it's not
# an abstract class and table exists.
# Otherwise it returns an empty array.
def attribute_names
@attribute_names ||= if !abstract_class? && table_exists?
column_names