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
Is it possible to use variables in seed files?
For example use admin_email variable as follows:
admin_email
owner_id: "<%= sprig_record(User, admin_email).id %>"
This will allow me to use a different value in dev / staging / prod environments.
I know I can create different seed files for each environment, but I want to avoid duplicating the data when only one field is different.
The text was updated successfully, but these errors were encountered:
Would be doable, but tricky. Requiring updates to https://github.com/vigetlabs/sprig/blob/master/lib/sprig/seed/attribute.rb#L26-L27. If you want to take a crack at it, we would review a PR submission. There is no current active development on this project though.
Sorry, something went wrong.
No branches or pull requests
Is it possible to use variables in seed files?
For example use
admin_email
variable as follows:owner_id: "<%= sprig_record(User, admin_email).id %>"
This will allow me to use a different value in dev / staging / prod environments.
I know I can create different seed files for each environment, but I want to avoid duplicating the data when only one field is different.
The text was updated successfully, but these errors were encountered: