beerlington
fd578fcf69
Refactor and consolidate serializer option setup
2013-03-19 22:21:41 -04:00
Steve Klabnik
324f9d83b3
Merge pull request #240 from beerlington/scope-name-alias
...
Adding scope_name method to alias scope in Serializer
2013-03-18 11:50:19 -07:00
beerlington
4a13f86961
Reference scope by same name as serialization scope
...
By default, the serialization scope uses current_user, and you can
now reference the scope as "current_user" in the serializer. If you
override the scope using "serialization_scope" in your controller,
it will use that method name instead.
2013-03-18 14:44:38 -04:00
Steve Klabnik
41a389a900
Move to CHANGELOG.md
2013-03-18 11:19:55 -07:00
Steve Klabnik
277d5ce44a
Adding section for 0.8 to changelog
2013-03-18 11:19:55 -07:00
Steve Klabnik
9fef47db4d
Merge pull request #238 from SamSaffron/fix
...
fix inheritance issues
2013-03-16 10:38:01 -07:00
Sam
ad1d34b2c4
Fix inheritance issues, poison cache if attributes change
2013-03-16 03:45:06 -07:00
Steve Klabnik
46378add65
Merge pull request #237 from samuil/master
...
Add test for mutual relation
2013-03-15 11:56:49 -07:00
Bartek Borkowski
00b5739d38
Add mutual association test
2013-03-15 18:59:05 +01:00
Steve Klabnik
746a63ab09
Merge pull request #89 from twinturbo/caching
...
Serializers Cache JSON & Hashes
2013-03-15 10:30:04 -07:00
Steve Klabnik
838c9285f1
Merge pull request #236 from tpitale/preserve-location
...
Rails actionpack responder preserves :location => nil, AM::S should too
2013-03-15 10:29:40 -07:00
Steve Klabnik
c12d82522d
Merge pull request #235 from tpitale/use-https
...
Use https for rubygems
2013-03-15 10:28:37 -07:00
Tony Pitale
d3c6596990
make sure to merge the original responder options into the given options to preserve location
2013-03-15 03:54:35 -04:00
twinturbo
4a5e1e1ae5
Attemp to fix bad test
2013-03-15 08:41:39 +01:00
Tony Pitale
ea2b24bc73
use https for rubygems
2013-03-15 03:35:56 -04:00
twinturbo
c3966fe741
ArraySerializer is also cached
2013-03-14 22:54:05 +01:00
twinturbo
bd90af0e49
Remove commented code
2013-03-14 22:41:34 +01:00
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