Skip to content
New issue

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

How to upload files through seed_fu script generated by Seed::Writer #96

Open
singhrajindia opened this issue May 20, 2015 · 0 comments

Comments

@singhrajindia
Copy link

I am trying to generate seed_fu script with Seed::Writer using below code:

writer.add(:id => '1', :name => 'Tom', :photo => File.new("#{Rails.root}/path/to/file/myphoto.jpg"))
This generates the seed_fu script like below:

{:id=>"1", :name=>"Tom", :photo=>#File:/Some/path/to/file/myphoto.jpg}
The '#' in the photo hash gets treated as ruby comment symbol so the script fails when running.

how can i dump the File.new call itself instead of the # in the generated file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant