Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
barriault opened this Issue · 3 comments

2 participants

@barriault

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)
@radar
Owner

@barriault Please be more precise about it is failing.

@barriault

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.

@barriault

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

@barriault barriault closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.