japacible / commission-me

Platform for commissioners and buyers to connect and finalize sales.
http://commissionme.herokuapp.com/
4 stars 3 forks source link

Add default commission request template to newly created users #159

Closed kcorman closed 10 years ago

kcorman commented 10 years ago

Currently all users in dev have a template, but if you create a new one it will not. The user's controller should put some type of default template JSON in there.

kcorman commented 10 years ago

Also, this is currently preventing users from commissioning new users.

kcorman commented 10 years ago

I can think of one way to quickly address this, and that would be to store the default JSON in a "default_settings_user) User object in the database. This fix would take about 10 minutes. The fix I'd prefer is keeping a file around to read, but reading files from relative paths in rails turned out to be not trivial. So depending on the fix we choose, this will probably take anywhere from 10 minutes to an hour.

Bejoty commented 10 years ago

What do you mean by "keeping a file around to read"? Just a _default_commissiontemplate.json file to read from as opposed to recalling the object from a database?

kcorman commented 10 years ago

Yeah that's exactly right. The only reason I find that preferable to the database is because if we use the database it will require that we set up this default user every time. Of course we may be able to make a migration, but that migration would have to get the data from somewhere.

kcorman commented 10 years ago

This is fixed.