Sunday, September 9, 2012

[Rails] Re: Re: get property of a model data

> Try @result.to_yaml to see its attributes

I got the following

#<ActiveRecord::Relation:0x00000100dedae0>---
- !ruby/object:Take
attributes:
id: 8
flight_name: soichi
flight_num: 1111
departure: 2012-09-21
check_in: true
weight: 5
created_at: 2012-09-10 02:16:05.691104000 Z
updated_at: 2012-09-10 02:16:05.691104000 Z
user_id: 2

--
Posted via http://www.ruby-forum.com/.

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate