Benjamin Fleischer
f32c0d97d5
Merge pull request #1491 from domitian/fix-documentation-links-in-readme
...
[DOCS] Changed the yardoc link in README.md for documentation to v.10.4
2016-02-04 15:21:31 -06:00
Benjamin Fleischer
6b50b5d92f
Merge pull request #1493 from ScottKbka/patch-1
...
Update readme.md to link to v0.10.0.rc4
2016-02-03 09:28:28 -06:00
bobba surendranath chowdary
7c26c1e09f
Changed the yardoc link, and removed the changes to made to documentation links
2016-02-03 11:32:51 +05:30
Scott Kobewka
a86227d4ee
Update readme.md to link to v0.10.0.rc4
2016-02-02 16:24:34 -05:00
bobba surendranath chowdary
211646b007
Changed the yardoc links,as old links are not taking to documentation pages,proper links for 0.10,0.9 and 0.8 in rubydoc
2016-02-02 22:39:53 +05:30
Benjamin Fleischer
72c2c9f0d7
Merge pull request #1447 from beauby/jsonapi-refactor-2016
...
[PERF] Refactor JsonApi adapter to avoid redundant computations.
2016-02-02 10:10:47 -06:00
Benjamin Fleischer
0edf48845b
Merge pull request #1488 from nate00/require-active-support-string-inflections
...
[FIX] Require ActiveSupport's string inflections
2016-01-31 16:02:29 -06:00
Nate Sullivan
3c1fe0fd0f
Require ActiveSupport's string/inflections
...
We depend on string/inflections to define String#underscore.
2016-01-31 13:45:58 -08:00
Benjamin Fleischer
f5ec8ed9d4
Reset Changelog [ci skip]
2016-01-28 21:02:40 -06:00
Benjamin Fleischer
7f261958b6
Merge pull request #1481 from wagenet/patch-2
...
Namespace is included in auto-registered adapters
2016-01-28 17:49:13 -06:00
Peter Wagenet
efdd466147
Namespace is included in auto-registered adapters [ci skip]
2016-01-28 15:48:18 -08:00
Benjamin Fleischer
592a5db96e
Merge pull request #1479 from wagenet/patch-1
...
Adapters inherit from Adapter::Base
2016-01-28 16:53:19 -06:00
Peter Wagenet
75fdbfa992
Adapters inherit from Adapter::Base
2016-01-28 14:27:53 -08:00
Benjamin Fleischer
65093055d6
Merge pull request #1310 from maurogeorge/patch-12
...
RFC: Primary namespace: ActiveModel::Serializer, ActiveModel::Serializers, vs. ActiveModelSerializers
2016-01-28 12:54:52 -06:00
João M. D. Moura
58ff7535b7
releaseing new version RC4
2016-01-27 10:03:01 -05:00
Lucas Hosseini
790efee9c3
Merge pull request #1467 from dgynn/pr_configure_generators
...
Ensure that generators get configured correctly
2016-01-26 18:16:13 +01:00
Alexandre de Oliveira
dfd22ad860
Merge pull request #1444 from bf4/serializer_prehistory
...
Why rails renderers are only sentinels for a method; not lookups [ci skip]
2016-01-25 19:57:41 -02:00
Alexandre de Oliveira
ef58efdf73
Merge pull request #1418 from brigade/collection-pluralize
...
Don't pluralize the CollectionSerializer#root for #json_key
2016-01-25 19:46:47 -02:00
Dave Gynn
b1b3e9fb6a
ensure that generators get configured correctly
2016-01-25 09:01:25 -08:00
Lucas Hosseini
2df8804047
Merge pull request #1459 from joyvuu-dave/update_readme
...
Update Readme to reflect AMS is no longer default in Rails 5
2016-01-24 22:02:02 +01:00
Lucas Hosseini
b34d53287e
Merge pull request #1462 from nate00/attribute-overriding--update-docs
...
Update attribute/association overriding docs
2016-01-24 22:00:31 +01:00
Nate Sullivan
0a937a0fba
Use new block-based attribute override in docs
2016-01-23 18:59:18 -08:00
Nate Sullivan
da85d944d4
Remove unrelated code from attribute override examples
2016-01-23 18:50:18 -08:00
Dave Riddle
40553258af
updates Readme to reflect AMS is no longer included by default in Rails 5
2016-01-22 23:18:15 -08:00
Lucas Hosseini
20ddc5e102
Refactor JsonApi adapter to avoid redundant computations.
2016-01-20 00:31:22 +01:00
Benjamin Fleischer
f056ef34e2
Why rails renderers are only sentinels for a method; not lookups
2016-01-18 23:38:12 -05:00
Benjamin Fleischer
8981683b9f
Merge pull request #1352 from bf4/railties
...
Fix generators (@dgynn); load Railtie only with Rails, ensures caching configured
2016-01-18 23:24:40 -05:00
Lucas Hosseini
f2d59b20ca
Update rendering.md
2016-01-17 16:58:35 +01:00
Dave Gynn
6713864b64
combine config initializers and update comments
...
this also changes the action_controller load hook to not trigger loading of the ActionController::Base
2016-01-16 14:08:32 -08:00
Lucas Hosseini
b9f4720cbd
Merge pull request #1406 from beauby/dynamic-jsonapi-string-links
...
Add support for custom dynamic valued links in JsonApi adapter.
2016-01-15 14:57:12 +01:00
Lucas Hosseini
30d8414cce
Add support for dynamic string-links in JsonApi adapter.
2016-01-15 14:36:42 +01:00
Benjamin Fleischer
d3bdc9be57
Replace load hook :active_model_serializers with :action_controller
2016-01-15 01:58:14 -06:00
Dave Gynn
ea8d463555
use action_controller configuration options in initializers
...
this uses the configuration settings rather than calling ActionController::Base to get the configured values.
after the "action_controller.set_configs" initializer has run, the configuration option holds the value Base will get when it loads.
2016-01-15 01:58:14 -06:00
Benjamin Fleischer
58a74d064e
Add CHANGELOG
2016-01-15 01:58:14 -06:00
Benjamin Fleischer
509221c1e0
Only call railtie when Rails is defined; assume controller loaded
...
Isolated Testing
- Rake test inspired by https://github.com/rails/rails/blob/v5.0.0.beta1/activejob/Rakefile
- Isolated unit inspired by
- https://github.com/rails/rails/blob/v5.0.0.beta1/railties/test/isolation/abstract_unit.rb
- https://github.com/rails/rails/blob/v5.0.0.beta1/activemodel/test/cases/railtie_test.rb
Misc
- Turns out `mattr_accessor(:logger) {
ActiveSupport::TaggedLogging.new(ActiveSupport::Logger.new(STDOUT)) }`
was always nil until the Railtie was loaded, since mattr_accessor
block defaults don't really work on modules, but on the classes that
include them.
- Commented on important on Rails being required first for caching to
work.
- In isolated tests, `active_support/core_ext/object/with_options` is required.
2016-01-15 01:54:07 -06:00
Benjamin Fleischer
fe015d17f2
Fix load-order issues
2016-01-15 01:54:07 -06:00
Dave Gynn
94db22c1e0
Only load generators when needed
...
- use hook_for to hook in the serializer and remove load_generators
- move generators so they can be found by rails
- move to_prepare block to railtie config
This commit improves the way the generators are loaded and how
they extend the resource generator.
* The initializer block has been changed to a `generator` block which is only executed when generators are needed.
* The call to `app.load_generators` has been removed. There is no need to load *all* generators.
* The `resource_override.rb` has been changed to use `hook_for` to extend the resource generator.
* The directory for the generators has been moved to match the way Rails looks to load generators.
With `hook_for` it would now be possible for a user to pass `--no-serializer` to skip that option.
The `--serialize` option also now shows up in the generator help with `rails g resource --help`.
These changes follow the way the Draper gem extends the `controller` generator.
2016-01-15 01:52:27 -06:00
Benjamin Fleischer
0c2153ac5e
Collect more Rails initialization code in the Railtie
2016-01-15 01:52:27 -06:00
Benjamin Fleischer
316026e9ce
Merge branch 'CorainChicago-changelog'
2016-01-15 01:05:37 -06:00
Benjamin Fleischer
47f6db203c
Touchup Changelog
2016-01-15 01:05:31 -06:00
CorainChicago
8ffcdc7668
update CHANGELOG
2016-01-15 01:05:31 -06:00
Benjamin Fleischer
87ca408ead
Merge pull request #1425 from beauby/extract-serializer-modules
...
[CLEANUP] Extract links and type-related methods to their own module.
2016-01-15 00:56:40 -06:00
Benjamin Fleischer
92e8a0a246
Merge pull request #1417 from koryteg/custom_root_docs
...
[DOCS] added documentation for adding custom root
2016-01-15 00:52:56 -06:00
Benjamin Fleischer
ac13053790
Merge branch 'maurogeorge-patch-09'
...
Rebased from cb3afa93ffa75a65b080c764547020bee2f2f191 to 9aed6ac63
and resolved conflicts by Benjamin Fleischer (bf4)
2016-01-15 00:47:06 -06:00
Mauro George
5058694f4a
Create assert_response_schema test helper
...
It is a common pattern to use JSON Schema to validate a API response[1], [2]
and [3].
This patch creates the `assert_response_schema` test helper that helps people do
this kind of validation easily on the controller tests.
[1]: https://robots.thoughtbot.com/validating-json-schemas-with-an-rspec-matcher
[2]: https://github.com/sharethrough/json-schema-rspec
[3]: https://github.com/rails-api/active_model_serializers/issues/1011#issuecomment-127608121
2016-01-15 00:45:56 -06:00
Benjamin Fleischer
9aed6ac634
Merge pull request #1390 from bf4/maurogeorge-patch-02
...
Bring back assert_serializer for controller testing
2016-01-14 17:54:31 -06:00
Mauro George
2f8c430a09
Update the RFC to use ActiveModelSerializers
...
After some internal discussion was decided to use the ActiveModelSerializers
namespace.
This patch update the content following this idea.
Ref:
https://github.com/rails-api/active_model_serializers/pull/1310/files#r45947587
https://github.com/rails-api/active_model_serializers/pull/1310/files#r47144210
2016-01-14 19:21:33 -02:00
Benjamin Fleischer
f5e2b991bf
Remove outdated regression test
...
Per https://github.com/rails-api/active_model_serializers/pull/1390#discussion_r48322329
2016-01-13 21:47:08 -06:00
Benjamin Fleischer
9779185d57
Restore test-local subscriber teardown
...
This commit revises 0ce4ad35a12ffd858f6a5d7bbeb48fc1e2cfac92
`Remove unused/unusable unsubscribe since we don't want to unsubscribe`
Looking at Rails implementation of assert_template
which was likely the inspiration for assert_serializer:
f756b33c13/lib/rails/controller/testing/template_assertions.rb
Ref:
- https://github.com/rails-api/active_model_serializers/pull/596
- https://github.com/rails-api/active_model_serializers/pull/620
- https://github.com/rails-api/active_model_serializers/issues/616
2016-01-13 21:47:08 -06:00
Benjamin Fleischer
e60937bc2f
Remove duplicate documentation
2016-01-13 21:47:08 -06:00