Commit Graph

723 Commits

Author SHA1 Message Date
Santiago Pastorino
bbd3c8b157 Define embeddable? as an alias of object 2013-05-21 17:03:08 -07:00
Santiago Pastorino
e295af2e2b Move embed methods to initialize and define readers 2013-05-21 17:03:08 -07:00
Santiago Pastorino
cd9e106640 All the attr_readers together 2013-05-21 17:03:08 -07:00
Santiago Pastorino
1c3f14407c There's no need for target_serializer method 2013-05-21 17:03:08 -07:00
Santiago Pastorino
feaefeeef3 Use name reader 2013-05-21 17:03:08 -07:00
Santiago Pastorino
296970415a Move key method to the base class 2013-05-21 17:03:08 -07:00
Santiago Pastorino
ecbb8bf6a6 Use == || == instead of include? 2013-05-21 17:03:08 -07:00
Santiago Pastorino
eb5b27de69 Initialize things in the initialize method and define readers 2013-05-21 17:03:08 -07:00
Santiago Pastorino
ea6d712cc8 key method is defined on subclasses 2013-05-21 17:03:07 -07:00
Santiago Pastorino
2dd0090f13 Reorder methods 2013-05-21 17:03:07 -07:00
Santiago Pastorino
0b648fceac Use private instead of protected, we don't use explicit receivers 2013-05-21 17:03:07 -07:00
Santiago Pastorino
f9e189e9d7 Rename associated_object to object 2013-05-21 17:03:07 -07:00
Santiago Pastorino
85bf3d2f3d Move duplicated code to the Base class 2013-05-21 17:03:07 -07:00
Santiago Pastorino
03669a74bc Associations::Config is now Associations::Base 2013-05-21 17:03:07 -07:00
Santiago Pastorino
2b22acff53 Use the readers instead of accessing the ivar directly 2013-05-21 17:03:07 -07:00
Santiago Pastorino
251fdc7ba4 Rename opts to klass_options 2013-05-21 17:03:07 -07:00
Santiago Pastorino
0b9f69529f Add default_embed_options 2013-05-21 17:03:07 -07:00
Santiago Pastorino
e273a2fb37 Use a third argument to pass serializer_options 2013-05-21 17:03:07 -07:00
Santiago Pastorino
c04d452823 Associations doesn't depend on the source serializer anymore :) 2013-05-21 17:03:07 -07:00
Santiago Pastorino
c1e710aae1 Save result of calling associated_object in a local var 2013-05-21 17:03:06 -07:00
Santiago Pastorino
baa690a01a Move if object to the top 2013-05-21 17:03:06 -07:00
Santiago Pastorino
0917148617 serialize_ids doesn't use source serializer and it's object 2013-05-21 17:03:06 -07:00
Santiago Pastorino
9f5e872621 Extract id_key to a method 2013-05-21 17:03:06 -07:00
Santiago Pastorino
a41de0286f Passing options[:hash] is not public API of include! 2013-05-21 17:03:06 -07:00
Santiago Pastorino
ea3566955c Remove option method just use the reader 2013-05-21 17:03:06 -07:00
Santiago Pastorino
5017fb686a Associations doesn't depend on source serializer anymore 2013-05-21 17:03:06 -07:00
Santiago Pastorino
460a250984 Get rid of refine 2013-05-21 17:03:06 -07:00
Santiago Pastorino
1a8709d71c Move caching to a new module 2013-05-21 17:03:06 -07:00
Santiago Pastorino
f179a27ed7 Add docs to serializable 2013-05-21 17:03:06 -07:00
Santiago Pastorino
aaa08c25ef Make include_meta and meta_key private 2013-05-21 17:03:06 -07:00
Santiago Pastorino
76fead041f Make Serializer reuse Serializable 2013-05-21 17:03:06 -07:00
Santiago Pastorino
0e876624ec Move reusable code to a module 2013-05-21 17:03:05 -07:00
Santiago Pastorino
64ed05c484 Define serializer as DefaultSerializer if not set 2013-05-21 17:03:05 -07:00
Steve Klabnik
731528e1f6 Merge pull request #305 from dv/patch-2
Clarify disabling root for ArraySerializers
2013-05-21 08:36:20 -07:00
David Verhasselt
2cc598c74a Update README.md
Setting AMS::Serializer.root = false doesn't automatically disable root for the ArraySerializer.
2013-05-21 12:00:39 +03:00
Steve Klabnik
1c4f3a70da Merge pull request #301 from dv/patch-1
Update README.md
2013-05-14 14:39:10 -07:00
David Verhasselt
1614ef3b12 Create new section 'Disabling root' in README 2013-05-14 11:30:22 +03:00
David Verhasselt
358b6a8875 Update README.md 2013-05-14 10:42:28 +03:00
David Verhasselt
5504293776 Update README.md
I'm a bit embarrassed to admit that it took me a while to figure out this was a possibility, so I figured maybe this change will save some other poor chaps their time and/or pride.
2013-05-13 18:23:20 +03:00
Steve Klabnik
8b7e9d32d7 Merge pull request #299 from vanstee/bump-version-in-readme
Bump minor version specified in Gemfile
2013-05-11 08:14:08 -07:00
vanstee
6b6afb8a83 Bump minor version specified in Gemfile 2013-05-11 02:33:27 -04:00
Rafael Mendonça França
e6e1b3feaa Merge pull request #297 from thetamind/patch-1
Fix code formatting in changelog
2013-05-08 12:38:36 -07:00
Matt Boehlig
2e0bee0c56 Fix code formatting in changelog
A code block example was not markdown formatted as code.
2013-05-08 14:34:16 -05:00
Steve Klabnik
fe84e0ad52 version bump 0.8.1 2013-05-05 17:35:51 -07:00
Steve Klabnik
c2f7af26f1 CHANGELOG for 0.8.1 2013-05-05 17:35:28 -07:00
Steve Klabnik
9c8ef8006b Merge pull request #295 from SamSaffron/master
Allow serializers to implement options
2013-05-05 17:34:17 -07:00
Sam
597a2e3148 allow serializers to implement an options attribute 2013-05-06 10:30:46 +10:00
Steve Klabnik
a022d464f5 Bump to 0.8.0 2013-05-05 13:45:50 -07:00
Steve Klabnik
48e5ca29f1 Add Coveralls for code coverage. 2013-05-05 13:38:56 -07:00
Steve Klabnik
92a165b545 Update CHANGELOG for 0.8.0 2013-05-05 13:20:24 -07:00