Skip to content

how to call view? #354

Answered by derekprior
edsondario asked this question in Q&A
Jan 19, 2022 · 1 comments · 2 replies
Discussion options

You must be logged in to vote

I don't fully follow the question. Did you create and run a migration with a create_view statement? If so, that view should be created in your development database and visible in schema.rb.

You can access it by creating an ActiceRecord model for that view (e.g if your view is posts create a Post model) or via direct SQL queries.

If you provide more detail or even a sample app, I can be of more help.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@edsondario
Comment options

@derekprior
Comment options

Answer selected by derekprior
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants