Ask A Question

Notifications

You’re not receiving notifications from this thread.

Virtual Generated Columns in Rails with ActiveRecord Discussion

Nice episode! I'd love to see an example where the virutal column on one table is using data from another table!

Reply

I think that would be a JOIN and referencing the other table's column, but good suggestion. 👍

Reply

What happens when passing stored: false?

Reply

The column is computed on select and not on insert/update.

Reply

For virtual column, if we provide true for store attribute in migration file, will create a column in db and store the value?

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 87,400+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.