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

Fixed problem that occurred when module :history was used after :finders #718

Merged
merged 4 commits into from
Jan 7, 2016

Conversation

kimrgrey
Copy link
Contributor

@kimrgrey kimrgrey commented Jan 1, 2016

Fixed #717.

Module :finders includes methods from friendly_id_config.finder_methods into base class. But module :history replaces this methods. So, to make :finders and :history works together those methods must be reincluded into base class during initialization of :history.

…e :finders.

Module finders includes methods from friendly_id_config.finder_methods into base class. But module :history replaces this methods.
So, to make :finders and :history works together those methods must be reincluded into base class during initialization of :history.

Please, see #717 for problem details.
…estWithFindersBeforeHistory.

Test was broken on Travis CI because Name HistoryTestWithFriendlyFindersModuleBeforeHistory::Novelist is
too long for sluggable_type.
… FriendlyId::Finders.setup instead of included.

Because relation_delegate_class is needed for correct extending of ActiveRecord::AssociationRelation
with finder methods.
Maximum version of mysql2 that works with Rails 4.0 is 0.3.10. Maximum version of mysql2 that works with Rails 4.1 is 0.3.13.
Older versions are not suppoted by ActiveRecord and couldn't be used for tests on those versions on Rails.
@parndt
Copy link
Collaborator

parndt commented Jan 2, 2016

looks good to me!

@kimrgrey
Copy link
Contributor Author

kimrgrey commented Jan 7, 2016

Well. Those changes looks good for 2 contributors. And this PR solves testing problem with mysql versions. Without this commit all other PR-s based on master will be broken. So, I think it's reasonable to merge it by myself.

kimrgrey added a commit that referenced this pull request Jan 7, 2016
Fixed problem that occurred when module :history was used after :finders.
@kimrgrey kimrgrey merged commit 950fd80 into master Jan 7, 2016
@kimrgrey kimrgrey deleted the issue#717 branch January 7, 2016 23:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants