You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The record is not set correctly in the following situations.(I think this case rarely happens)
books.yml
- id: 1name: Book1
Sample code
require'bundler/inline'gemfiledosource'https://rubygems.org'gem'active_hash'endclassBook < ActiveYaml::BaseendclassSubBook < Bookset_filename'books'end# Book.count should be 1, and it will be 1.puts"Book.count => #{Book.count}"# SubBook.count should be 1, but it will be 0.puts"SubBook.count => #{SubBook.count}"# Set data_loaded to falseSubBook.data_loaded=false# SubBook.count will be 1puts"SubBook.count => #{SubBook.count}"
I think the solution to this problem is to change data_loaded from class_attributes to class instance variable. What do you think?
The text was updated successfully, but these errors were encountered:
The record is not set correctly in the following situations.(I think this case rarely happens)
books.yml
Sample code
I think the solution to this problem is to change
data_loaded
from class_attributes to class instance variable. What do you think?The text was updated successfully, but these errors were encountered: