Commit Graph

350 Commits

Author SHA1 Message Date
twinturbo
b854d49298 Rebase against master 2013-03-14 22:40:46 +01:00
twinturbo
5027f04441 Update railtie 2013-03-14 22:40:07 +01:00
twinturbo
e3888f0a40 Clean up interface inconistency 2013-03-14 22:40:06 +01:00
twinturbo
535a33a33b Have to opt in with #cache_key 2013-03-14 22:40:06 +01:00
twinturbo
e923174a26 #cache_key delegates to #object by default 2013-03-14 22:40:06 +01:00
twinturbo
b4395f281b Add basic caching 2013-03-14 22:40:06 +01:00
Steve Klabnik
6408b73e3c Merge pull request #233 from SamSaffron/fix
Optimised performance for attribute extraction
2013-03-14 14:22:27 -07:00
Sam
710c375088 remove safe guard per discussion with steveklabnik 2013-03-14 14:11:04 -07:00
Steve Klabnik
6642a86f2b Merge pull request #234 from rykov/responder
Ensure that Responders work with Rails-API
2013-03-14 11:36:55 -07:00
Michael Rykov
b3a6fa6334 Ensure that ActionController includes MimeResponds 2013-03-14 11:15:14 -07:00
Sam
08a182d743 per discussion remove instrumentation altogether 2013-03-13 22:18:40 -07:00
Sam
31ba6fbb08 Optimised performance for attribute extraction
Disabled all instrumentation unless enabled explicitly
2013-03-13 21:20:56 -07:00
Steve Klabnik
9c00622b4a Merge pull request #228 from rykov/responder
AMS should be a Responder, rather than modify render :json behavior
2013-03-13 20:26:35 -07:00
Steve Klabnik
bf93a4d51a Merge pull request #229 from adomokos/fixing_readme
Fixing README.md
2013-03-13 19:04:45 -07:00
Attila Domokos
5f9209e619 Fixing README.md 2013-03-13 20:53:20 -04:00
Michael Rykov
37b0690fb8 Add a Responder to handle respond_with(resource) 2013-03-13 16:45:23 -07:00
Steve Klabnik
ad886495a1 Travis now has bundler 1.3
So we don't need to install it any more.
2013-03-10 10:21:32 -07:00
Steve Klabnik
4b3c146638 ruby-head -> ruby2.0.0 2013-03-10 10:21:04 -07:00
Steve Klabnik
a546a942c5 Merge pull request #226 from pwim/master
More clearly recommend to add to Gemfile
2013-03-10 08:58:07 -07:00
Paul McMahon
87509e9537 More clearly recommend to add to Gemfile 2013-03-10 17:48:34 +09:00
Steve Klabnik
f4916f113f Merge pull request #223 from tchak/id-serialization-with-hooks
use `read_attribute_for_serialization` to serialize ids
2013-03-08 09:17:19 -08:00
Steve Klabnik
e76a16486f Merge pull request #170 from FundingGates/master
Support optional types for computed attributes
2013-03-08 09:11:29 -08:00
tchak
e2c10f4440 use read_attribute_for_serialization to serialize ids
* in order to allow some optimisation in simple cases, we call `read_attribute_for_serialization` on parent with association_id name
2013-03-08 09:57:42 +01:00
Steve Klabnik
a1755c5b27 Provide a mixin to override AR::Base#to_json
Fixes #192.
2013-03-06 15:32:09 -08:00
Steve Klabnik
7b86838fa6 Merge pull request #207 from stantona/create-default-serializer
Create DefaultSerializer so that as_json uses same interface.
2013-03-06 15:26:35 -08:00
Adam Stanton
5a55a6831a Remove line break on the conditional statement. 2013-03-06 11:48:50 -08:00
Steve Klabnik
85a7529dc9 Merge pull request #222 from miloshadzic/master
Update release version in README.
2013-03-06 11:26:42 -08:00
Miloš Hadžić
befac17160 Update release version in README. 2013-03-06 17:40:41 +01:00
Adam Stanton
da26ebd26f Merge branch 'create-default-serializer' into HEAD
Conflicts:
	lib/active_model/array_serializer.rb
2013-03-05 21:48:58 -08:00
Steve Klabnik
fabdc621ff bumping to 0.7.0 2013-03-05 17:07:16 -08:00
Steve Klabnik
dc2257977f Merge pull request #198 from jredburn/master
'embed_key' option to allow embedding by attributes other than IDs
2013-03-05 15:57:34 -08:00
Steve Klabnik
06c65871a8 Merge pull request #213 from michihuber/fix_rendering_nil_with_custom_serializer
Fix rendering nil with custom serializer
2013-03-05 15:54:51 -08:00
Jeremy Redburn
7cd7d295e0 Adding 'embed_key' option to allow embedding attributes other than ID 2013-03-05 18:52:31 -05:00
Steve Klabnik
d638e21c8c Merge pull request #180 from fellix/fix-remove-root-globally
Fix global ``` self.root = false ```
2013-03-05 15:48:08 -08:00
Steve Klabnik
585b1bc508 No longer recommend installation from git 2013-03-05 15:28:56 -08:00
Steve Klabnik
95937c6fc7 Merge pull request #167 from GateGuru/feature/specify-association-serializers-as-strings
Add support for specifying the serializer for an association as a String...
2013-03-05 15:04:29 -08:00
Steve Klabnik
49cca10592 Merge pull request #172 from vladson/patch-1
Added description of default_serializer_options to README.md. Fixes #168
2013-03-05 14:46:06 -08:00
Steve Klabnik
71bf522b38 Merge pull request #209 from ismaelga/attributes_with_keys
Able to specify keys on the attributes method
2013-03-05 14:29:28 -08:00
Steve Klabnik
9a54af30e2 Merge pull request #218 from phcoliveira/patch-1
Update README.md file to better describe scope.
2013-03-05 14:22:29 -08:00
Paulo H. C. de Oliveira
e322f903cf Update README.md file to better describe scope.
This commit also corrects the code about deactivating globally the root name of arrays.
2013-03-05 13:37:11 -03:00
Ismael Abreu
2d2094b588 changes to be able to specify multiple attributes with keys 2013-03-05 02:45:22 +00:00
Steve Klabnik
1c28577280 Merge pull request #215 from mulder/feature/reloading
Serializer Reloading via ActiveSupport::DescendantsTracker
2013-02-28 09:03:02 -08:00
Nicholas Mulder
918a9de546 Remove caching of Serializer constants to allow ActiveSupport::Dependency reloading to work 2013-02-28 10:02:38 -05:00
Nicholas Mulder
fa51c5f574 Add ActiveSupport::DescendantsTracker to Serializer and ArraySerializer 2013-02-28 10:01:40 -05:00
Michi Huber
c7a420d295 Don't fail if object is nil, render null 2013-02-26 11:17:28 +01:00
Michi Huber
58a063eff0 serialization test: respect root settings when root object is nil 2013-02-26 11:12:28 +01:00
Michi Huber
9f93f34a34 test cases by fblee
Merge remote-tracking branch 'fblee/master'
2013-02-26 09:57:35 +01:00
Steve Klabnik
0114e49238 Merge pull request #210 from tpitale/master
Reduce double map to once; Fixes datamapper eager loading.
2013-02-18 09:04:37 -08:00
Tony Pitale
dcd4121322 reduce 2x map; fixes datamapper eager loading 2013-02-17 16:44:27 -05:00
Adam Stanton
b4616d737c Restore order of fields in hash to original order. 2013-02-11 07:04:59 -08:00