Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

No table named #{table} exists for SQL views #338

Closed
barriault opened this Issue Feb 12, 2014 · 3 comments

Comments

Projects
None yet
2 participants

I'm trying to use Ransack with an SQL view, but it is failing in the lib/ransack/adapters/active_record/3.2/context.rb file on line 28.

raise "No table named #{table} exists" unless schema_cache.table_exists?(table)
Member

radar commented Feb 13, 2014

@barriault Please be more precise about it is failing.

My database contains an SQL view. When I attempt to run a Ransack query against a model tied to the view, line 28 raises an exception because schema_cache.table_exists?(table) returns false. My database is sqlite3 1.3.8.

This may be an sqlite3 problem, but I figured I'd start here. I'm planning on moving my dev DB to postgresql since my production app runs on Heroku anyway. I'll let you know if this is still a problem with postgresql.

This seems to be working fine in postgresql. I created an issue over here: rails/rails#14041

@barriault barriault closed this Feb 13, 2014

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