Kind of an off the wall question but I want to use the config / load
path [for models specifically] in an external app that essentially loads
the database for my rails app [there’s transformations, processing
involved, i.e. fixtures won’t help here] - it true DYI spirit, could
anyone suggest a way to effectively use the models/config in a seperate
script without having to restate them? I checked in the Rail Initializer
but didn’t have much luck…
Kind of an off the wall question but I want to use the config / load
path [for models specifically] in an external app that essentially loads
the database for my rails app [there’s transformations, processing
involved, i.e. fixtures won’t help here] - it true DYI spirit, could
anyone suggest a way to effectively use the models/config in a seperate
script without having to restate them? I checked in the Rail Initializer
but didn’t have much luck…
Thanks
script/runner ‘load “db/fill_user_table.rb”’
Normally script/runner just executes the code passed to it, pass it a
file to execute. I think this will work.