Closed catmando closed 6 years ago
Also note that while application_record's name forces it to be first in most cases, its not always the case, in particular using different char sets, or OS's may give you a different collating sequence, and hence application_record may come after some other file like myfatmodel.rb !!!
For the short term we should probably just force application_record to come first if the file exists.
cockroach (synonym for bug) lurking in hyperloop-config/lib/hyperloop/imports.rb, Line 72, very persistant
the overall issue will be effectively closed by #10 the specific issue mentioned in the comment above on Sept 17 was fixed in issue #2
You would like to have the load order be hyperloop/models before hyperloop/components You would also like to have hyperloop/models/application_record.rb to always be the first application file loaded.
The only problem is that if hyperloop-config explicitly orders things, then it must also be able to handle the case where the file does not exist.
Something like this is what we want I think:
import 'models/application_record', ignore_missing_file: true
import_tree 'hyperloop/models' # ignore_missing_file defaults to true for import tree
import_tree 'hyperloop/operations'import_tree 'hyperloop/stores'
import_tree 'hyperloop'`