Skip to content
This repository has been archived by the owner. It is now read-only.

Translate on different connection #366

Merged
merged 8 commits into from Jun 16, 2017

Conversation

@nsaumini
Copy link
Contributor

commented Jun 14, 2017

This is a fix for following issue. The solution is derived from one of the user's work around.

nsaumini added some commits Jun 12, 2017

Added test case
Added test case for translation on different connection
$country->setConnection('mysql2');
$sgCountry = $country->find($countryId);
$this->assertEquals($sgCountry->translate('sg')->name, 'Singapore');
}

This comment has been minimized.

Copy link
@dimsav

dimsav Jun 15, 2017

Owner

Nice! Also let's assert here that by using the default connection, the Singapore record cannot be found in the database.

This comment has been minimized.

Copy link
@nsaumini

nsaumini Jun 16, 2017

Author Contributor

@dimsav Noted & added more assertions as you requested and also I added a empty check before setConnection

nsaumini added some commits Jun 16, 2017

Review changes
Added more assertions to make sure the record is not in default db connection

@dimsav dimsav merged commit 65197e7 into dimsav:master Jun 16, 2017

1 check passed

continuous-integration/styleci/pr The StyleCI analysis has passed
Details
@dimsav

This comment has been minimized.

Copy link
Owner

commented Jun 16, 2017

Awesome, thanks! We still have to update the changelog and the docs for the release.

@nsaumini

This comment has been minimized.

Copy link
Contributor Author

commented Jun 17, 2017

@dimsav Thanks. I'm not sure how/where to update the changelog & docs for the release. Can you guide me?

@dimsav

This comment has been minimized.

Copy link
Owner

commented Jun 17, 2017

Sure! Here's the changelog (we should make a 7.3 release) and the docs (we should add somewhere the new method.

@dimsav

This comment has been minimized.

Copy link
Owner

commented Jun 18, 2017

Released :-)

@nsaumini

This comment has been minimized.

Copy link
Contributor Author

commented Jun 19, 2017

Thanks for the support :)

@nsaumini nsaumini deleted the nsaumini:patch-1 branch Jun 19, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants
You can’t perform that action at this time.