Commit Graph

906 Commits

Author SHA1 Message Date
José Valim
2c151438b1 Merge pull request #59 from stayce/master
Updated Readme
2012-05-16 12:04:53 -07:00
stayce
74a2846f78 updated and clarified readme. changed PostController to PostsController as it would be generated by rails. Also changed ApplicationSerializer to ActiveModel::Serializer 2012-05-16 11:54:57 -07:00
Yehuda Katz
a2d73faa63 Generate a serializer with each new model 2012-04-30 17:18:51 -07:00
Yehuda Katz
d5d917ea56 Don't require current_user 2012-04-30 17:18:51 -07:00
José Valim
a2b0649e28 Merge pull request #53 from cowboyd/patch-1
grammar fix/simplification.
2012-04-26 12:55:44 -07:00
Charles Lowell
fa790fda4d grammar fix/simplification. 2012-04-26 14:40:13 -05:00
Yehuda Katz
6a2103bcb6 Merge pull request #48 from joliss/simplify
Simplify code
2012-04-25 10:51:42 -07:00
José Valim
d1758ac619 Merge pull request #49 from joliss/doc
Doc
2012-04-17 07:05:49 -07:00
Jo Liss
5b41e648c9 Wrap text to 80 columns 2012-04-17 16:03:46 +02:00
Jo Liss
709218119b Use two spaces instead of tabs; use syntax-highlighting 2012-04-17 16:03:43 +02:00
Jo Liss
67d5eefd8e Simplify code 2012-04-17 15:54:34 +02:00
José Valim
93d0cb5117 Merge pull request #42 from vosechu/updated-docs
updating docs to remove comments about generators and clarifying default...
2012-04-14 08:23:57 -07:00
José Valim
5f0bb6d148 Merge pull request #43 from ctide/master
Add a :root option when defining associations
2012-02-22 22:16:21 -08:00
ctide
f17e4cde39 Add a :root option to associations, which enables you to define what the root level key will be for the associated objects. 2012-02-22 19:35:10 -08:00
Chuck Vose
a0e08377fa clarify how to get old-style json without needing a monkey-patch 2012-02-15 10:39:49 -08:00
Chuck Vose
2b2f3e62e8 updating docs to remove comments about generators and clarifying default to_json functionality 2012-02-14 14:08:47 -08:00
José Valim
2f6d1e26ed Merge pull request #41 from jbrown/fix_comment
Fix comment.
2012-02-14 12:46:32 -08:00
Justin Brown
19c0b35473 Fix comment. 2012-02-14 15:39:46 -05:00
José Valim
ad14384090 Update MIT-LICENSE.txt 2012-02-14 21:28:16 +01:00
José Valim
9c66ff1fba Merge pull request #40 from elc/license
License
2012-02-14 12:27:45 -08:00
Josh Ballanco
b6658798f4 Remove license notice from lib file 2012-02-14 15:11:24 -05:00
Josh Ballanco
58bf8c14f3 Add the MIT license
[closes #33]
2012-02-14 14:20:47 -05:00
Yehuda Katz
a0d02b43a5 Merge pull request #29 from onehouse/master
github repo reference update
2012-01-30 23:08:59 -08:00
Elliot Larson
7b59dec135 fixing github repo reference in README documentation 2012-01-24 10:55:39 -08:00
Yehuda Katz
0b30518ad8 Merge pull request #28 from carllerche/master
Allow specifying the serializer class in the render options (+ other tiny fix)
2012-01-20 12:20:54 -08:00
Carl Lerche
46f18343cd Add an options attr_reader in the ArraySerializer 2012-01-20 12:17:51 -08:00
Carl Lerche
4e8a2af1ec Allow passing in the serializer class from the render method 2012-01-20 12:17:37 -08:00
tomhuda
dd32f91a25 Optimize merging associations 2012-01-16 12:12:00 -08:00
Yehuda Katz
28aad30f4e Update README 2012-01-11 21:36:36 -07:00
Yehuda Katz
55647286da Make it possible to supply default serializer
options in a controller.
2012-01-11 21:30:10 -07:00
Yehuda Katz
671fc14888 remove scope as a separate concept and pass it in
as an option.
2012-01-11 21:16:02 -07:00
Yehuda Katz
4ad9c64e46 Allow serializers to receive instructions to
explicitly include or exclude specific lists of
associations.
2012-01-11 20:56:36 -07:00
Yehuda Katz
cb316b00f7 Write more tests 2012-01-11 20:28:07 -07:00
Yehuda Katz
2bae9363c7 Test custom embed options per association 2012-01-11 20:21:29 -07:00
Yehuda Katz
d2c88c9dd2 Clean up pending tests 2012-01-11 20:09:28 -07:00
Yehuda Katz
fb6af2efbb Making include_associations! a public API 2012-01-11 20:03:48 -07:00
Yehuda Katz
573be9302d Encapsulate more concerns in the associations. 2012-01-11 20:01:47 -07:00
Yehuda Katz
fb45aa4838 Simplify association call signature 2012-01-11 16:09:38 -07:00
Yehuda Katz
c32558248a Cleanup 2012-01-11 16:02:23 -07:00
Yehuda Katz
d42634a1d2 Remove dead code. 2012-01-11 15:54:41 -07:00
Yehuda Katz
020b2a19df serializable_hash should just call include! 2012-01-11 15:48:16 -07:00
Yehuda Katz
5a8682b4e6 Make it easier to look up associations by name. 2012-01-11 15:36:17 -07:00
Yehuda Katz
b22eebf569 More refactoring:
* Changed associations to be classes
* remove @hash and always use @options[:hash]
* pass serializer options down to child serializers
2012-01-11 15:28:49 -07:00
Yehuda Katz
89103f1e74 Test that has_one works. 2012-01-11 13:07:43 -07:00
Yehuda Katz
72b8213bee If an existing association exists, use it to
get the value if none was provided.
2012-01-11 13:06:19 -07:00
Yehuda Katz
dd0b56c748 HasOne associations work 2012-01-11 12:26:49 -07:00
Yehuda Katz
f9d0259340 Start cleaning up serializers to support
include/exclude functionality.

This process involves building a few lower-level
primitives so not as much logic is hardcoded in
monolithic helper methods.
2012-01-11 12:18:18 -07:00
Yehuda Katz
ab1a4074ba Revert polymorphism 2012-01-11 11:13:32 -07:00
Yehuda Katz
c083774f9c Check for respond_to? :to_ary instead of being
an Array.
2012-01-10 20:53:29 -07:00
Yehuda Katz
a8760fa854 Add pry 2012-01-10 15:16:00 -07:00