Commit Graph

216 Commits

Author SHA1 Message Date
Jo Liss
b706244122 Merge pull request #128 from dgeb/rails3+
compatibility with rails >= 3.0
2012-09-19 11:16:24 -07:00
Dan Gebhardt
a8eb21d87d compatibility with rails >= 3.0 2012-09-19 13:01:18 -04:00
Tee Parham
9584b9e147 move OrderedSet to separate file 2012-09-18 01:28:07 +02:00
Tee Parham
b8f01ba2f3 move ArraySerializer to separate file 2012-09-18 01:28:07 +02:00
Yehuda Katz
f9117072fb Describe undesirable but necessary cruft 2012-09-16 20:36:02 -07:00
Yehuda Katz
2130cdfc00 List out the event names to avoid garbage 2012-09-16 20:20:34 -07:00
Yehuda Katz
a025f1b6f6 Eliminate some String garbage 2012-09-16 20:08:30 -07:00
Yehuda Katz
9da0176d2b Merge branch 'master' of github.com:josevalim/active_model_serializers 2012-09-16 19:46:17 -07:00
Jo Liss
afc3beef16 Merge pull request #122 from oriolgual/patch-1
Document how to embed ids or objects per association
2012-09-12 14:23:50 -07:00
Jo Liss
8f1b33aad0 Merge pull request #116 from anathematic/patch-1
Added homepage in Gemspec
2012-09-12 14:21:50 -07:00
Jo Liss
98c58b47f1 Merge pull request #118 from teeparham/dev_gemspec
move development gem dependencies into gemspec
2012-09-12 14:21:20 -07:00
Yehuda Katz
a21529370c Merge pull request #123 from dgeb/conditional-includes
Conditional includes (closes #111)
2012-09-02 21:56:38 -07:00
Yehuda Katz
84f8c1c3d5 Merge branch 'master' of github.com:josevalim/active_model_serializers 2012-09-02 21:21:05 -07:00
Dan Gebhardt
7fc8606101 documentation of conditional include options for serializers 2012-08-29 10:54:56 -04:00
Dan Gebhardt
42221a6140 define include_XXX? methods, which can be overridden to conditionally include attributes and associations 2012-08-29 09:26:41 -04:00
Dan Gebhardt
68dc57eb73 simplified the API for include_associations!() to make conditional includes cleaner 2012-08-29 07:42:23 -04:00
Oriol Gual
027f1580dc Document how to embed ids or objects per association 2012-08-27 11:51:16 +03:00
José Valim
001c1d0634 Merge pull request #121 from twinturbo/polymorphic-update
Easier to work with polymorphic interface
2012-08-25 09:43:38 -07:00
twinturbo
38859d1f3d Easier to work with polymorphic interface 2012-08-25 17:39:39 +02:00
Tee Parham
caf2daaa60 move development gem dependencies into gemspec 2012-08-23 21:13:16 -06:00
Thomas
4b429c1f6e Added homepage in Gemspec 2012-08-16 12:11:36 +10:00
José Valim
655c4fe1c2 Merge pull request #110 from pivotal-medici/fix_default_url_options
Return empty hash when url_options not provided
2012-08-07 10:22:05 -07:00
Alex Kwiatkowski & Will Bagby
754aa295ba Return empty hash when url_options not provided 2012-08-07 12:56:58 -04:00
José Valim
dd5cdb6ddb Merge pull request #106 from raycohen/scope_option_precedence
Scope option precedence
2012-07-29 03:06:47 -07:00
Ray Cohen
424dacb457 scope option to render takes precedence over serialization_scope 2012-07-28 21:06:15 -04:00
Ray Cohen
1e7c69c729 Test for having scope option to render override the controller's serialization scope 2012-07-28 19:05:45 -04:00
José Valim
21817bc795 Merge pull request #105 from raycohen/readme-fix-custom-attributes
fix custom attributes with scope readme section
2012-07-28 10:21:39 -07:00
Ray Cohen
63465fda68 fix custom attributes with scope readme section 2012-07-28 13:01:06 -04:00
José Valim
dbde02d647 Merge pull request #103 from joliss/cleanup
Use blocks instead of eval to define methods
2012-07-25 23:34:29 -07:00
Jo Liss
e8f2ecebfb Use blocks instead of eval to define methods 2012-07-26 00:28:59 +02:00
José Valim
3f75c14267 Merge pull request #101 from teeparham/patch-1
fix typo in README
2012-07-24 00:57:46 -07:00
Tee Parham
6a37cfe219 fix typo in README 2012-07-23 14:07:49 -06:00
José Valim
ff7c6adb58 Merge pull request #100 from teeparham/readme-arrays
Add section on Arrays to README
2012-07-23 12:14:59 -07:00
Tee Parham
663d443884 Merge branch 'array-serializer-root' of github.com:teeparham/active_model_serializers into readme-arrays 2012-07-23 13:02:04 -06:00
Tee Parham
3ecf22a249 more README markdown cleanup 2012-07-23 12:55:47 -06:00
Tee Parham
f8263153b6 cleanup markdown in docs 2012-07-23 12:49:02 -06:00
Tee Parham
53da0b12fd add docs for serializing arrays 2012-07-21 15:25:41 -07:00
Tee Parham
bf2fa2d31c add docs for custom serializers 2012-07-21 15:25:08 -07:00
José Valim
b813646076 assert_include is not available before 1.9 2012-07-21 10:01:27 +02:00
José Valim
77b873a9a4 Update release notes for upcoming release 2012-07-21 09:52:39 +02:00
José Valim
e886f597c7 Sets are not ordered, do not depend on the order 2012-07-21 09:48:12 +02:00
José Valim
ef7d475912 Merge pull request #94 from teeparham/array-serializer-root
Add root option to ArraySerializer
2012-07-21 00:38:18 -07:00
José Valim
62484e758c Merge pull request #95 from twinturbo/set-serializer
Close #90
2012-07-21 00:37:31 -07:00
José Valim
6f07a0297e Merge pull request #97 from twinturbo/include-bug
Include Related Bugs
2012-07-21 00:36:04 -07:00
José Valim
0123e80dd3 Update README.markdown 2012-07-21 10:35:25 +03:00
José Valim
e122675373 Merge pull request #99 from matthewrobertson/master
Documentation on how to add custom attributes
2012-07-21 00:27:52 -07:00
Matthew Robertson
91945f02c8 Added a section to the README about defining custom attributes by overriding serializable_hash 2012-07-20 15:18:30 -07:00
José Valim
90af9e0d16 Merge pull request #98 from ccschmitz/patch-1
Fix a couple typos
2012-07-16 08:19:27 -07:00
Chris Schmitz
a6473e70c4 Fix a couple typos. 2012-07-16 09:29:12 -05:00
twinturbo
6f3b250dc9 Don't include empty polymoprhic associations
Take this serializer:

class TodoSerializer < ActiveModel::Serializer
  root :todo, :include => true
  has_one :reference, :polymorphic => true
end

A nil reference would generate this JSON:

{
  "todo": { "reference": null },
  "nil_classes": []
}

This commit prevents the `nil_classes` key from being added when
serializing and including nil polymoprhic associations.
2012-07-16 15:08:01 +02:00