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

table_exists should also consider the views #1476

Closed
wants to merge 4 commits into from
Closed

table_exists should also consider the views #1476

wants to merge 4 commits into from

Conversation

dmathieu
Copy link
Contributor

@dmathieu dmathieu commented Jun 3, 2011

Something strange happened while changing the pull request's commits and my branch has been committed into my own fork.

So I'm reopening a pull request. This follows #1469

@jonleighton
Copy link
Member

Hey,

It needs a test. You can add db-specific code to add a view in the postgres sql file in test/schemas, and then test that it works.

Also, we should probably automatically mark records as readonly if they come from a view. @tenderlove, what do you think?

Cheers

@dmathieu
Copy link
Contributor Author

dmathieu commented Jun 4, 2011

I've added a test.
However I don't think you should apply it now. I realize it doesn't work on mysql and sqlite either (which seems logical, but the original ticket, #379 didn't mention it).

I'll see what I can do for mysql and sqlite.

@dmathieu
Copy link
Contributor Author

dmathieu commented Jun 4, 2011

It now works for all adapters !

I completely agree with you about marking the model as readonly when it's a view.
If @tenderlove agrees with it, I'll look into that too.

@dmathieu dmathieu closed this Jun 29, 2011
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.

None yet

2 participants