Display all Rails ActiveRecord Attributes 28 Nov 2007 by Philipp Schmid - 103 words By accident, I just found out that if you type the ActiveRecord model name in your Rails console session (script/console), it prints out all the attributes of your model. No more trips to your database to find out how attributes are named! Delayed:netmonic schmidp$ script/console Loading development environment (Rails 1.99.0) >> XenServer => XenServer(id: integer, hostname: string, created_at: datetime, updated_at: datetime, slots: integer, created_by: integer, updated_by: integer) >> XenVm => XenVm(id: integer, customer_id: integer, xen_server_id: integer, name: string, memory_size: integer, swap_size: integer, disk_size: integer, architecture: string, distribution: string, filesystem: string, created_at: datetime, updated_at: datetime, internal_name: string, state_id: integer, created_by: integer, updated_by: integer) >> Please enable JavaScript to view the comments powered by Disqus. comments powered by Disqus