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

Inherit orderable_configurations #28

Merged
merged 2 commits into from
Jun 25, 2014
Merged

Inherit orderable_configurations #28

merged 2 commits into from
Jun 25, 2014

Conversation

j-miyake
Copy link
Contributor

@pyromaniac
Copy link
Collaborator

This is not the complete patch, unfortunately. Inherited class configuration will affect parent classes. To avoid this just change https://github.com/pyromaniac/mongoid_orderable/blob/master/lib/mongoid/orderable/orderable_class.rb#L37 to something like klass.orderable_configurations = klass.orderable_configurations.merge(column_name => configuration)

@johnnyshields
Copy link
Member

Maybe better to name this :orderable_config ?

@pyromaniac
Copy link
Collaborator

Whatever actually

@j-miyake
Copy link
Contributor Author

@pyromaniac - Definetely. I revised the code and added a spec. Thanks!

pyromaniac added a commit that referenced this pull request Jun 25, 2014
@pyromaniac pyromaniac merged commit c4279f7 into mongoid:master Jun 25, 2014
@pyromaniac
Copy link
Collaborator

Thank you so much!

@j-miyake j-miyake deleted the inherit_orderable_conf branch June 25, 2014 06:10
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.

4 participants