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

Rails4 Compatability #3

Merged
merged 9 commits into from
Aug 4, 2015
Merged

Rails4 Compatability #3

merged 9 commits into from
Aug 4, 2015

Conversation

cantino
Copy link

@cantino cantino commented May 19, 2015

@shirish-pampoorickal @randycoulman @urnf

It's not clear to be why we would need unscoped / with_exclusive_scope on parent.

@shirish-pampoorickal
Copy link
Member

LGTM!

@cantino
Copy link
Author

cantino commented Jun 9, 2015

@shirish-pampoorickal Do you have any idea why with_exclusive_scope was used?

@bgreg
Copy link

bgreg commented Jun 10, 2015

@shirish-pampoorickal @cantino @urnf

We had tests on Rails 4 failing due to the fact that populate_materialized_path was trying to grab path_string off parents that didn't exist even though parent_id was set on the child. This checks that both the parent and parent_id exist first.

Please ensure that this expectation is correct since we are changing it slightly. We've added a test for it.

@cantino
Copy link
Author

cantino commented Jun 10, 2015

@shirish-pampoorickal Opinion on this?

@shirish-pampoorickal
Copy link
Member

@cantino I did not find any reason for using with_exclusive_scope. @urnf @bgreg LGTM

@tmccrmck
Copy link

@shirish-pampoorickal @cantino

Anyone opposed to merging this?

model_base_class.send(:with_exclusive_scope) do
self.materialized_path = parent ? parent.path_string : "-"
end
self.materialized_path = (parent_id && parent) ? parent.path_string : "-"
Copy link
Author

Choose a reason for hiding this comment

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

Is it possible for parent to exist but not have parent_id, such as during object building with new records?

@cantino
Copy link
Author

cantino commented Jul 10, 2015

I'm out next week -- @shirish-pampoorickal owns this.

@shirish-pampoorickal
Copy link
Member

@cantino @naiyt @trentmccormick This LGTM!

@cantino
Copy link
Author

cantino commented Jul 20, 2015

Go ahead and merge, and maybe only bump Gemfile in rails 4?

@cantino
Copy link
Author

cantino commented Aug 4, 2015

@naiyt Let's merge but not bump on master, only on rails 4.

@naiyt
Copy link

naiyt commented Aug 4, 2015

Sounds good to me.

naiyt added a commit that referenced this pull request Aug 4, 2015
@naiyt naiyt merged commit 26409fc into master Aug 4, 2015
@naiyt naiyt deleted the rails4 branch August 4, 2015 17:41
@cantino
Copy link
Author

cantino commented Aug 4, 2015

Ok, since the branch is deleted, be sure to bundle update on rails4.

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

Successfully merging this pull request may close these issues.

6 participants