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

Remove Rails Dependency #2

Merged
merged 4 commits into from
Dec 6, 2011
Merged

Remove Rails Dependency #2

merged 4 commits into from
Dec 6, 2011

Conversation

ahawkins
Copy link
Contributor

@ahawkins ahawkins commented Dec 1, 2011

I really like this code and I don't want to see it bound to Rails. I use activemodel a ton without any other rails things so I made it so. I added a Railtie which is required if Rails is available. Now activemodel is the only dependency.

Move configuration into a Railtie.
Only dependency is now activemodel
@josevalim
Copy link
Contributor

Thanks, but we don't need a railtie still. We could just check if actionpack is there.

@ahawkins
Copy link
Contributor Author

ahawkins commented Dec 1, 2011

Ok, take a look at those commits.

include ::ActionController::Serialization
end
rescue LoadError => ex
puts ex

Choose a reason for hiding this comment

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

Could you remove this puts?

@ahawkins
Copy link
Contributor Author

ahawkins commented Dec 2, 2011

ok. The puts has been removed. Don't know how that snuck in there....

josevalim added a commit that referenced this pull request Dec 6, 2011
Remove Rails Dependency
@josevalim josevalim merged commit 3edf6c2 into rails-api:master Dec 6, 2011
joaomdmoura referenced this pull request in joaomdmoura/active_model_serializers Jun 16, 2015
bf4 referenced this pull request in bf4/active_model_serializers Dec 26, 2015
Fixed a bug that appears when a nil association is included
Empact added a commit to brigade/active_model_serializers that referenced this pull request Jan 7, 2016
One of three constituents is used to provide the CollectionSerializer
json_key:
1) the :root option - controlled by the caller
2) the #name of the first resource serializer - the root or
   underscored model name
3) the underscored #name of the resources object - generally
   equivalent to the underscored model name of rails-api#2

Of the three, only the latter 2 are out of the callers control, and
only the latter two are expected to be singular by default. Not
pluralizing the root gives the caller additional flexibility in
defining the desired root, whether conventionally plural,
unconventionally plural (e.g. objects_received:) or singular.
Empact added a commit to brigade/active_model_serializers that referenced this pull request Jan 7, 2016
One of three constituents is used to provide the
CollectionSerializer's #json_key:

1) the :root option - controlled by the caller
2) the #name of the first resource serializer - the root or
   underscored model name
3) the underscored #name of the resources object - generally
   equivalent to the underscored model name of rails-api#2

Of the three, only the latter 2 are out of the callers control, and
only the latter two are expected to be singular by default. Not
pluralizing the root gives the caller additional flexibility in
defining the desired root, whether conventionally plural,
unconventionally plural (e.g. objects_received:) or singular.
Empact added a commit to brigade/active_model_serializers that referenced this pull request Jan 11, 2016
One of three constituents is used to provide the
CollectionSerializer's #json_key:

1) the :root option - controlled by the caller
2) the #name of the first resource serializer - the root or
   underscored model name
3) the underscored #name of the resources object - generally
   equivalent to the underscored model name of rails-api#2

Of the three, only the latter 2 are out of the callers control, and
only the latter two are expected to be singular by default. Not
pluralizing the root gives the caller additional flexibility in
defining the desired root, whether conventionally plural,
unconventionally plural (e.g. objects_received:) or singular.
Empact added a commit to brigade/active_model_serializers that referenced this pull request Jan 11, 2016
One of three constituents is used to provide the
CollectionSerializer's #json_key:

1) the :root option - controlled by the caller
2) the #name of the first resource serializer - the root or
   underscored model name
3) the underscored #name of the resources object - generally
   equivalent to the underscored model name of rails-api#2

Of the three, only the latter 2 are out of the callers control, and
only the latter two are expected to be singular by default. Not
pluralizing the root gives the caller additional flexibility in
defining the desired root, whether conventionally plural,
unconventionally plural (e.g. objects_received:) or singular.
Empact added a commit to brigade/active_model_serializers that referenced this pull request Jan 12, 2016
One of three constituents is used to provide the
CollectionSerializer's #json_key:

1) the :root option - controlled by the caller
2) the #name of the first resource serializer - the root or
   underscored model name
3) the underscored #name of the resources object - generally
   equivalent to the underscored model name of rails-api#2

Of the three, only the latter 2 are out of the callers control, and
only the latter two are expected to be singular by default. Not
pluralizing the root gives the caller additional flexibility in
defining the desired root, whether conventionally plural,
unconventionally plural (e.g. objects_received:) or singular.
Empact added a commit to brigade/active_model_serializers that referenced this pull request Jan 12, 2016
One of three constituents is used to provide the
CollectionSerializer's #json_key:

1) the :root option - controlled by the caller
2) the #name of the first resource serializer - the root or
   underscored model name
3) the underscored #name of the resources object - generally
   equivalent to the underscored model name of rails-api#2

Of the three, only the latter 2 are out of the callers control, and
only the latter two are expected to be singular by default. Not
pluralizing the root gives the caller additional flexibility in
defining the desired root, whether conventionally plural,
unconventionally plural (e.g. objects_received:) or singular.
Empact added a commit to brigade/active_model_serializers that referenced this pull request Jan 13, 2016
One of three constituents is used to provide the
CollectionSerializer's #json_key:

1) the :root option - controlled by the caller
2) the #name of the first resource serializer - the root or
   underscored model name
3) the underscored #name of the resources object - generally
   equivalent to the underscored model name of rails-api#2

Of the three, only the latter 2 are out of the callers control, and
only the latter two are expected to be singular by default. Not
pluralizing the root gives the caller additional flexibility in
defining the desired root, whether conventionally plural,
unconventionally plural (e.g. objects_received:) or singular.
Empact added a commit to brigade/active_model_serializers that referenced this pull request Jan 14, 2016
One of three constituents is used to provide the
CollectionSerializer's #json_key:

1) the :root option - controlled by the caller
2) the #name of the first resource serializer - the root or
   underscored model name
3) the underscored #name of the resources object - generally
   equivalent to the underscored model name of rails-api#2

Of the three, only the latter 2 are out of the callers control, and
only the latter two are expected to be singular by default. Not
pluralizing the root gives the caller additional flexibility in
defining the desired root, whether conventionally plural,
unconventionally plural (e.g. objects_received:) or singular.
Empact added a commit to brigade/active_model_serializers that referenced this pull request Jan 18, 2016
One of three constituents is used to provide the
CollectionSerializer's #json_key:

1) the :root option - controlled by the caller
2) the #name of the first resource serializer - the root or
   underscored model name
3) the underscored #name of the resources object - generally
   equivalent to the underscored model name of rails-api#2

Of the three, only the latter 2 are out of the callers control, and
only the latter two are expected to be singular by default. Not
pluralizing the root gives the caller additional flexibility in
defining the desired root, whether conventionally plural,
unconventionally plural (e.g. objects_received:) or singular.
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