Ask A Question


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!


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


What happens when passing stored: false?


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


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

Join the discussion
Create an account Log in

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

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

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