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

Custom table name #7

Merged
merged 2 commits into from
Sep 23, 2013
Merged

Custom table name #7

merged 2 commits into from
Sep 23, 2013

Conversation

ambentzen
Copy link

Use table name from SqlSession
Added tests to custom table name

Don't use Rails 4.0.0

Added upper bound on rails dependencies

Usage

Set SmartSession::SqlSession.table_name to your desired name in the config somewhere appropriate (such as config/application.rb). And remember to update/create the session migration.

Use table name from SqlSession
Added tests to custom table name

Don't use Rails 4.0.0

Added upper bound on rails dependencies
@fcheung
Copy link
Owner

fcheung commented Jul 9, 2013

Cool. Out of interest, what breaks in rails 4?

@ambentzen
Copy link
Author

Probably nothing, but I have not tested against it. And I might have gone a bit overboard with the commit squashing.

It should not be hard to make a travis scheme to test against both 3.x and 4.0. I'm going to do that right now.

@ambentzen
Copy link
Author

On Rails 4.0.0 there are 9 failures and 2 errors, and a lot of deprecation warnings.

@fcheung
Copy link
Owner

fcheung commented Jul 9, 2013

Thanks for checking. The only comment I have really is that I don't think those specs check that the customs table name is actually being used? Running the whole test suite again seems a little over the top and like I said doesn't I think achieve anything in the current state. I think if the tests set the table name to something custom and only created that custom name then I think we could be confidant that there isn't a hard coded 'sessions' hanging around somewhere.

@ambentzen
Copy link
Author

You are completely correct, I will look into that tomorrow. The proper way to do it is probably to create a 'sessions' schema and a 'sessions_custom' schema and make sure they are used in the proper context.

The test suites are now independent of each other. I haven't found a way to delete the session table afterwards to truly make them independent.
fcheung added a commit that referenced this pull request Sep 23, 2013
@fcheung fcheung merged commit e51a8ab into fcheung:master Sep 23, 2013
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.

2 participants