You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As you can see we do not require `activemodel`(the gem name in gemspec) insted
57
-
we use `active_model`.
35
+
This way we are clarifing the boundaries of
36
+
[ActiveModelSerializers and Rails](https://github.com/rails-api/active_model_serializers/blob/master/CHANGELOG.md#prehistory)
37
+
and make clear that the `ActiveModel::Serializer` class is no longer the primary
38
+
behavior of the ActiveModelSerializers.
58
39
59
-
And based on the [bump of `0.10.0.pre` released by Steve Klabnik](https://github.com/rails-api/active_model_serializers/tree/86fc7d7227f3ce538fcb28c1e8c7069ce311f0e1)
60
-
if we take a look on README and gemspec always is used `ActiveModel::Serializers`.
40
+
# Detailed design
61
41
62
42
## New classes and modules organization
63
43
64
-
Since this will be a big change we can do this on baby steps, read small PRs. A
44
+
Since this will be a big change we can do this on baby steps, read small pull requests. A
65
45
possible approach is:
66
46
67
-
- Create the `ActiveModel::Serializers` namespace;
68
-
- Move all content under `ActiveModelSerializers` to be under
69
-
`ActiveModel::Serializers`, the logger is on this step;
47
+
- All new code will be in `lib/active_model_serializers/` using
48
+
the module namespace `ActiveModelSerializers`.
70
49
- Move all content under `ActiveModel::Serializer` to be under
71
-
`ActiveModel::Serializers`, the adapter is on this steps;
72
-
- Move all content under `ActiveModel` to be under `ActiveModel::Serializers`,
50
+
`ActiveModelSerializers`, the adapter is on this steps;
51
+
- Move all content under `ActiveModel` to be under `ActiveModelSerializers`,
73
52
the `SerializableResource` is on this step;
74
-
- Now that all the code lives under `ActiveModel::Serializers` we can:
75
-
- create a better name to the `ActiveModel::Serializers::Serializer`
76
-
keeping in mind only to keep this in the same namespace
77
-
- create a better name to the `ActiveModel::Serializers::Serializer::Adapter::JsonApi`
78
-
probably remove this from the `ActiveModel::Serializers::Serializer`
79
-
and do something like `ActiveModel::Serializers::Adapter::JsonApi`
80
-
keeping in mind only to keep this in the same namespace
81
-
- Change all public API that doesn't make sense, keeping in mind only to keep
82
-
this in the same namespace
53
+
- Change all public API that doesn't make sense, keeping in mind only to keep
54
+
this in the same namespace
83
55
- Update the README;
84
56
- Update the docs;
85
57
86
58
The following table represents the current and the desired classes and modules
|`ActiveModel::Serializer`|`ActiveModel::Serializers::Serializer`| I know that is probably a bad name, but In a second moment we can rename this to `Resource`[for example following this idea](https://github.com/rails-api/active_model_serializers/pull/1301/files#r42963185)|
|`ActiveModel::Serializer`|`ActiveModelSerializers::Serializer`| The name can be discussed in a future pull request. For example, we can rename this to `Resource`[following this idea](https://github.com/rails-api/active_model_serializers/pull/1301/files#r42963185) more info about naming in the next section|
0 commit comments