We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to share some helper methods across multiple seed files:
db/fixtures/development/01.rb db/fixtures/development/02.rb db/fixtures/development/helper.rb
the problem is that require_relative does not work because the seed files are run with eval: http://stackoverflow.com/questions/16421669/ruby-require-relative-gives-loaderror-cannot-infer-basepath
require_relative
eval
Is there a way to require using relative paths from the seed files? The best I could come up with was using Rails.root.join, but that is not very DRY.
require
Rails.root.join
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I want to share some helper methods across multiple seed files:
the problem is that
require_relative
does not work because the seed files are run witheval
: http://stackoverflow.com/questions/16421669/ruby-require-relative-gives-loaderror-cannot-infer-basepathIs there a way to
require
using relative paths from the seed files? The best I could come up with was usingRails.root.join
, but that is not very DRY.The text was updated successfully, but these errors were encountered: