Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/adapter #612

Merged
merged 27 commits into from
Aug 31, 2014
Merged

Feature/adapter #612

merged 27 commits into from
Aug 31, 2014

Conversation

bolshakov
Copy link

Adapter configuration using AMS.config. It may be configured with a class or symbol:

ActiveModel::Serializer.config.adapter  =  MyAdapter

# or

ActiveModel::Serializer.config.adapter  =  :json_api

Start to work on JsonApi adapter to better understand interface between adapters and serializers.
Rename null adapter to json adapter. Null adapter always return empty hash now.
Introduce ArraySerializer.
Add a lot of tests.

I would be glad to receive any feedback.

@@ -84,5 +103,9 @@ def attributes
hash[name] = send(name)
end
end

def associations
self.class._associations.dup
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should return serializers

@bolshakov
Copy link
Author

@steveklabnik I think it's time to merge since PR become to big. It is not complete yet, but i'm going to keep working.

steveklabnik added a commit that referenced this pull request Aug 31, 2014
@steveklabnik steveklabnik merged commit 98a3e56 into rails-api:master Aug 31, 2014
@steveklabnik
Copy link
Contributor

Sounds good! I like where this is going, and it doesn't have to be perfect just quite yet. Let's merge this in and keep working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants