Santiago Pastorino
78245b07bc
Move the default value to the options param
2014-01-03 20:02:43 -02:00
Santiago Pastorino
5fa4002039
Allow only to pass scope to associations
...
Closes #483
2014-01-03 19:48:01 -02:00
Santiago Pastorino
60fc55021c
Revert "Allow to pass options to associations"
...
This reverts commit c8cfe94f29 .
2014-01-03 19:44:40 -02:00
Santiago Pastorino
c8cfe94f29
Allow to pass options to associations
...
Closes #331
2014-01-02 19:56:08 -02:00
Santiago Pastorino
67c550f2ee
Serialize embedding in root deeply nested associations
...
Closes #444
2014-01-02 18:34:11 -02:00
Adrian Mugnolo
3cbcf461a3
Set up a logger on tests
2013-12-30 14:14:08 -02:00
Santiago Pastorino and Adrian Mugnolo
8fa252b4fd
Make sure generator hooks get run
...
Use Rails::Engine#load_generators instead of require +
Rails::Generators::configure!.
2013-12-30 12:03:51 -02:00
Santiago Pastorino and Adrian Mugnolo
8f03596d7b
Use railtie + initialize on tests
...
Use Rails::Application#initialize! instead of Rails::Engine#load_generators in
integration tests.
2013-12-30 12:03:45 -02:00
Adrian Mugnolo
5e77e7fcd0
Add test:isolated task
2013-12-30 11:09:30 -02:00
Adrian Mugnolo
771b70aa84
No need to add lib to tests
2013-12-30 11:07:29 -02:00
Adrian Mugnolo
1c9ab8fd24
Drop reference to self
2013-12-30 10:57:39 -02:00
Adrian Mugnolo
80ff5ebc5a
Use 1.9 hash syntax
2013-12-30 10:57:39 -02:00
Santiago Pastorino
e6bb000419
Merge pull request #476 from sherwinyu/master
...
Update README documentation on Serializer#filter
2013-12-27 10:55:42 -08:00
Santiago Pastorino
99fa399ae6
Depend on activerecord-jdbc-adapter for jruby edge tests
...
When this
358505dbdd
commit is released we can depend again on the released gem
2013-12-27 12:17:39 -02:00
Sherwin Yu
18336d7699
Update README.md explaining that Serializer#filter needs to return an array
2013-12-26 18:01:27 -05:00
Santiago Pastorino
7c68ee4b3f
Remove unneeded require
2013-12-26 19:47:52 -02:00
Santiago Pastorino
171a520106
Disallow failures on rbx
2013-12-26 18:03:27 -02:00
Santiago Pastorino
9327afb0fc
Move rubysl-test-unit to the right place and add json to the rest of the Gemfiles
2013-12-26 18:00:37 -02:00
Santiago Pastorino
1589a35ff8
Add rubysl-test-unit to the rbx section of the Gemfile
2013-12-26 17:55:37 -02:00
Santiago Pastorino
2375154a6d
Add json dep in the rbx section of the Gemfile
2013-12-26 17:25:32 -02:00
Santiago Pastorino
f18594a980
Add missing json require
2013-12-26 17:16:48 -02:00
Santiago Pastorino
0ca9e18219
Use 2.1.0 in Travis
2013-12-26 13:09:49 -02:00
Santiago Pastorino
19bdc52a43
Make Travis test with 2.1.0-rc1
2013-12-21 16:00:04 -02:00
Santiago Pastorino
d04cbb3806
Add dependencies needed to run Rubinius tests
2013-12-19 15:59:43 -02:00
Santiago Pastorino
428f3ba3bf
Move edge out from allow_failures on Travis
2013-12-18 13:35:27 -02:00
Santiago Pastorino
039fa05018
Remove useless test that behaves differently in different Rails versions
2013-12-18 13:14:40 -02:00
Santiago Pastorino
62a6b6ffc6
Test using a structure that returns a consistent value on Rails 4.0 & 4.1
2013-12-18 13:04:41 -02:00
Adrian Mugnolo and Santiago Pastorino
0f4547eb77
Rename method to serializable_object
2013-12-17 16:13:50 -02:00
Adrian Mugnolo and Santiago Pastorino
f14f931957
Clean up HasOne array wrapping logic
...
Introduce private _wrap_in_array option for now.
2013-12-17 15:42:35 -02:00
Adrian Mugnolo and Santiago Pastorino
28fbb62ec4
Avoid unneeded logic
2013-12-17 13:14:39 -02:00
Santiago Pastorino
80d9fb56d2
Merge pull request #452 from plexus/has_one_each_serializer_fix
...
Using a HasOne association twice raises an exception (Undefined method `map')
2013-12-16 17:49:26 -08:00
Adrian Mugnolo and Santiago Pastorino
700e6b83c1
Serializers now inherit root
2013-12-16 17:55:50 -02:00
Santiago Pastorino
f72115fb79
Test association inheritance in serializers
2013-12-16 17:45:24 -02:00
Adrian Mugnolo and Santiago Pastorino
115de49004
Remove explicit reference to self
2013-12-16 17:27:49 -02:00
Santiago Pastorino
adee76181f
Merge pull request #468 from stas/attrs_and_assoc_inheritance
...
Serializers now inherit attributes and associations.
2013-12-16 11:14:16 -08:00
Adrian Mugnolo and Santiago Pastorino
e2b7bba626
Stub out comments writer when needed
2013-12-16 17:10:20 -02:00
Adrian Mugnolo and Santiago Pastorino
ceded40aa1
Move serialization tests to serialization_test.rb
2013-12-16 16:59:04 -02:00
Adrian Mugnolo and Santiago Pastorino
af7437b7e4
Split basic object and model array serialization tests
2013-12-16 16:50:50 -02:00
Santiago Pastorino
5c00ce0443
Merge pull request #451 from plexus/embed_in_root_merge
...
embed_in_root only returns the associated objects of a single instance
2013-12-16 10:39:53 -08:00
Stas SUȘCOV
0febd8f628
Serializers now inherit attributes and associations.
2013-12-11 17:59:32 +02:00
Santiago Pastorino
2faa571a9c
Do not allo ruby-head failures
2013-12-06 15:33:08 -02:00
Santiago Pastorino
ac0ce8dcf9
Use jruby and rbx in Travis
2013-12-06 15:26:38 -02:00
Arthur Neves
3a9475a168
Ruby-head and fast_finish
2013-12-03 22:55:29 -05:00
Arthur Neves
ddaf09a099
Alow rbx to fail
2013-12-03 22:53:37 -05:00
Santiago Pastorino
39b2a2bdf4
Update Rubinius to 2.2.1
2013-11-28 15:47:30 -03:00
Santiago Pastorino
c65ac37152
Merge pull request #453 from jasontruluck/master
...
Add @options back into serializers for passing custom options
2013-11-28 10:38:41 -08:00
Jason Truluck
a110df6caf
Add @options back into serializers to maintain the functionality of render :json as noted in the docs
...
This functionality used to exist in v0.8.1. This adds the ability to
pass other options that will be usable in the serializer via the
options accessor.
This works by adding an attr_accessor for options so it is available
and is set by the remaining options in the provided options hash during
initialization.
2013-11-12 12:57:31 -05:00
Arne Brasseur
8c3866532a
Fixes a bug in the HasOne association where serializing twice in a row causes
...
an exception.
2013-11-11 15:30:46 +01:00
Arne Brasseur
1db96ec7a9
When using embed: :ids ; embed_in_root: true, and serializing multiple objects,
...
only the associated objects of the last object in the collection will actually
show up in the serialized data.
For example, if you serialize a collection of two posts, each containing one or
more comments, only the comments of the last post show up. The reason is a
Hash#merge wich overwrites the array rather than appending to it.
This commit fixes this by merging the collection arrays, rather than the top-level
hashes.
2013-11-11 14:30:34 +01:00
Rafael Mendonça França
127413ffde
Merge pull request #445 from todd/fix-controller-scaffold-generator
...
Fixed Rails 4 Controller Scaffold Generator.
2013-11-06 12:43:23 -08:00