Skip to content

Instantly share code, notes, and snippets.

@daniel-g
Created June 13, 2012 00:26
Show Gist options
  • Save daniel-g/2920988 to your computer and use it in GitHub Desktop.
Save daniel-g/2920988 to your computer and use it in GitHub Desktop.
Example of DB serialized object in Rails
select positions from teacher_profiles limit 1;
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| positions |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| ---
- &2535799820 !ruby/object:TeacherProfile::Position
current: true
errors: !ruby/object:ActiveModel::Errors
base: *2535799820
messages: !omap []
grades:
- :3
- :5
- :6
- :8
- :11
role: :support_staff
subjects:
- :english_language_arts
- :history_and_social_science
- :technology
validation_context:
|
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment