Skip to content

Inherit orderable_configurations#28

Merged
pyromaniac merged 2 commits intomongoid:masterfrom
j-miyake:inherit_orderable_conf
Jun 25, 2014
Merged

Inherit orderable_configurations#28
pyromaniac merged 2 commits intomongoid:masterfrom
j-miyake:inherit_orderable_conf

Conversation

@j-miyake
Copy link
Copy Markdown

@pyromaniac
Copy link
Copy Markdown
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
Copy Markdown
Member

Maybe better to name this :orderable_config ?

@pyromaniac
Copy link
Copy Markdown
Collaborator

Whatever actually

@j-miyake
Copy link
Copy Markdown
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
Copy Markdown
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