Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Lighthouse 5478 - Postgres and Sqlite3 no longer able to map to database views #379

Closed
dark-panda opened this Issue · 2 comments

4 participants

@dark-panda

https://rails.lighthouseapp.com/projects/8994/tickets/5478/

It doesn't look like this issue was ever actually resolved, as the patch supplied in the comments was never actually applied to the source tree. For instance,

class MyTable < ActiveRecord::Base
   set_table_name 'my_view'
end

MyTable.table_exists? # => false

This is when using PostgreSQL as a backend. I can't find any mention of pg_views anywhere in the source, so I don't think that the patch was ever applied properly.

@georgeclaghorn georgeclaghorn reopened this
@tomstuart tomstuart referenced this issue from a commit in econsultancy/rails
@dtrasbo dtrasbo Remove ActiveRecord::Base#class_name [#379 state:committed]
Signed-off-by: José Valim <jose.valim@gmail.com>
735a4db
@dmathieu dmathieu referenced this issue from a commit
@dmathieu dmathieu add testcase for #379
Which does not fail, which means the issue has since been solved.
Closes #379
d45d036
@dmathieu
Collaborator

I've added a test case for this in #1469.
The test does not fail. The issue then appears to have been solved.

@dmathieu
Collaborator

After more reflection, I don't think this is really an issue. ActiveRecord manages only tables anyway, not views.
If you need views management in your app, use or make a gem which does that.

@svenfuchs svenfuchs referenced this issue from a commit in svenfuchs/rails
@dtrasbo dtrasbo Deprecate ActiveRecord::Base#class_name [#379 state:committed]
Signed-off-by: José Valim <jose.valim@gmail.com>
ac42e69
@jeremy jeremy 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.