vigetlabs / sprig-reap

Sprig-Reap is a gem that allows you to output your application's data state to seed files.
MIT License
18 stars 18 forks source link

Improve edge case handling #6

Closed h0tl33t closed 10 years ago

h0tl33t commented 10 years ago

This PR covers the following:

ltk commented 10 years ago

There's an undocumented sprig_file feature in Sprig, that lets you store files within a files directory and upload them to records just like they were uploaded from a browser. For example, if you had a cat picture at db/seeds/development/files/cat.png, you could attach it to a record with <%= sprig_file('cat.png') %>.

You might consider handling files differently than other attributes, by first adding them to the files dir, then including a sprig_file reference in the seed file.

(I shall work on documenting this feature in Sprig.)

efatsi commented 10 years ago

:+1: to these updates

ltk commented 10 years ago

looks good other than that filename uniqueness stuff :+1:

h0tl33t commented 10 years ago

Thanks guys!