Created
July 3, 2010 10:39
-
-
Save spockz/462495 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Transaction.find(1).id | |
| =>1 | |
| YAML::dump(Transaction.find(1).detail) | |
| =>--- !ruby/object:Transaction::Detail attributes: subscription_plan_name: foobar payment_method: visa feature_level: foobar recurring: true prefix_options: {} | |
| Transaction.find(1).detail.payment_method | |
| => undefined method `payment_method' for #<Transaction::Detail:0x103e28a70> | |
| Transaction.find(1).detail.attributes.payment_method | |
| => undefined method `payment_method' for #<Hash:0x103ef2bb8> | |
| Transaction.find(1).detail.attributes[:payment_method] | |
| => nil | |
| (transaction.detail.attributes['payment_method']) | |
| => visa | |
| # I thought symbols would evaluate to strings in rails? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment